Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error: SendFailure (Error writing headers)"

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!!!

like image 294
Vladi Isakov Avatar asked Oct 07 '14 11:10

Vladi Isakov


1 Answers

This is likely due to certificate errors. Can you test using straight HTTP? Or set your app to ignore certificate checks as described here.

like image 184
bbsimonbb Avatar answered Oct 12 '22 04:10

bbsimonbb