I made an app that uses Restsharp to communicate with an asp.net web api json webservice. It works as it should on the simulator but on the phone response.Data is always null. How can I get restsharp to work on the phone, or are there any similar libraries. I use restsharp from here
Here is the code that gives me the error:
var hh = client.ExecuteAsync<List<Accommodation>>(request, (response) => {
//on the phone response.Data is null
if (response.StatusCode == HttpStatusCode.OK && response.Data != null)
searchCompleteAction(response.Data);
else
searchCompleteAction(null);
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
});