AFNetworking 2 Response Error (Content type: text/html and not JSON)

前端 未结 2 693
梦如初夏
梦如初夏 2021-01-13 06:40

After trying nearly every response on the subject, I\'ve come up without a working answer to my problem.

The problem: So I\'ve implemented the uploading portion of m

2条回答
  •  花落未央
    2021-01-13 07:41

    You can set the AFHTTPSessionManager to accept any MIME Type:

    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    

提交回复
热议问题