I'm trying to fetch data in "xamarin studio" using "rest sharp" package like so:
var client = new RestClient ("https://xxxx.xxxx.com");
var request = new RestRequest ("/api/external/xxxx/xxxx/", Method.GET);
request.AddParameter("username", "xxxx");
request.AddParameter("api_key", "xxxx");
request.AddHeader("Content-type", "application/json");
request.AddHeader("Accept", "text/plain");
request.RequestFormat = DataFormat.Json;
var response = client.Execute (request);
var model = JsonConvert.DeserializeObject<RootObject> (response.Content);
The error I get is
Error: SendFailure (Error writing headers)
I really don't know what is wrong. I'm using windows 7 64-bit.
Please help... Thank you for advance!!!
This is likely due to certificate errors. Can you test using straight HTTP? Or set your app to ignore certificate checks as described here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With