I’m using NSURLConnection and NSURLRequest to do a HTTP POST of some XML data to a server.
However the server cannot find the data in the HTTP body because it has been packaged up assuming a web page is doing a form submission (parameter=form-urlencoded is getting set, presumably by default by NSURLConnection?).
This is not something I am doing explicitly, I am simply adding the body data using:
[request setHTTPBody: [body dataUsingEncoding:NSUTF8StringEncoding]];
How can I stop/override this behaviour?
I don’t know the default value, but you can change it with:
Take a look to the documentation.