I am using ASIHTTPRequest, its working fine for posting dictionaries to the web service in the body
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"Ben" forKey:@"first_name"];
but how can i use the
ASIFormDataRequest
to send a single string?
something like
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:token];
no value and key,just a string in the body,
thanks!
If you want to send data via POST but prefer to create the POST body yourself, use
appendPostData:orappendPostDataFromFile:. The code goes something like this –