I am quite new to C# and WP8 in general. I am currently finding difficulties in doing a simple POST to web service and retrieving the answer. All is done via JSON.
So far I managed to write this:
public async static Task<string> SendJSONData(string urlToCall, string JSONData)
HttpClient client = new HttpClient();
HttpResponseMessage response = await client.PostAsync(urlToCall, new StringContent(JSONData.ToString(),Encoding.UTF8,"application/json"));
string res = response.Content.ReadAsStringAsync().Result;
// error catching...
But obviously no luck and I am pretty sure is bad. Thus I am unable to find any proper documentation on that.
In fact I am not sure it sends the POST in the right way and what I get from that "return res" is: System.Threading.Tasks.Task`1[System.String]
The idea as said is to send a JSON array and to retrieve one from the same URL.
Thank you all for your help!