First are you certain your call is being handled by the server & that the server is returning data? You should probably verify that first.
What does the JSON look like that's returned? You can use
json2csharp.com to generate a class that you can use for deserialize the response. The deserialized object will be in the response's Data property.
You then use that class to parameterize the ExecuteAsync call, e.g. I have service that shortens a url, and returns
By default json2csharp will name the class representing the JSON response "RootObject":
public class RootObject
{
public string shorturl { get; set; }
public string longurl { get; set; }
}
I typically rename that to reflect the object I'm deserialzing:
public class ShortUrl
{
public string shorturl { get; set; }
public string longurl { get; set; }
}
When you make the call, parameterize it with that object, and then cast the response DATA property to the object type, assuming the call completed properly.
client.ExecuteAsync<ShortUrl>(request, (resp , handle) =>
{
if (resp.StatusCode == HttpStatusCode.OK)
{
ShortUrl su = (ShortUrl)resp.Data;
}
}
You can set Method = Method.POST afaik just as you set GET in your code above.