ios - AFHttpClient post with both parameters and JSON in body -


sorry, im kinda newb regarding http post terminology!

i have post webservice cannot changed: format follows:

http://somewebaddress/json/getallfeedsrestfullywrapped?usertoken=foo              

so parameters are:

key:usertoken , value=foo

in body need put json formatted array this:

{"feedids":[1,2,3,4,5,6]}

im trying accomplish afnetworking cannot seem make work situation.

i have tried both afhttpclient , afjsonreqestioperation im not able combine request , body correct.

so hope knows how this. appreciated.

try that

[[yourhttpclient sharedhttpclient] postpath:@"getallfeedsrestfullywrapped?usertoken=foo"                               parameters:[nsdictionnary {"feedids":[1,2,3,4,5,6]}]                                  success:^(afhttprequestoperation *request, id json)  {   }                                  failure:^(afhttprequestoperation *request, nserror *error)  {   }]; 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -