Hey Guys,
I’ve been using Uniweb for my web requests, but I had problem with iOS8 so I’m changing it back to plain WWW. I used it like so and it has worked when my content type is “application/x-www-form-urlencoded”.
I used it like so :
string myUrl ="someUrl.com/someFolder"
WWWForm form = new WWWForm();
form.AddField("Content-Type", "application/x-www-form-urlencoded");
form.AddField("Content-length", "0");
var headers = new Hashtable();
headers.Add("WWW-Authenticate","xxxxx");
WWW request = new WWW(url,form.data,headers);
It works fine but when I use it for content “application/json”, I get the error 415 Unsupported Media Type.
I read that I missed the Header “Accept”, “application/json” so I tried to add it to the form and it didn’t work than I added it to the headers and it didn’t worked either.
Does anyone have an idea ?
Thanks a lot.