阅读背景:

使用AFHTTPClient将JSON发布为POST请求的正文

来源:互联网 

I am trying to find a way, using AFNetworking, to set the Content-Type header to be application/json and to POST with JSON in the body. The methods that I'm seeing in the documentation (postPath and requestWithMethod) both take a dictionary of parameters, which I assume is encoded in the standard form syntax. Does anyone know of a way to instruct AFHTTPClient to use JSON for the body, or do I need to write the request on my own?I am trying to find a way, using AFNetworking,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: