What am I doing wrong here?
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("mobile_numbers", "5555555555"),
new KeyValuePair<string, string>("message", "Whoo hahahahah")
});
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("https://api.iwin.co.za");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "134134134");
HttpResponseMessage response = client.PostAsync("iwin/api/v1/messages", formContent).Result;
When I run code above I get this error: An existing connection was forcibly closed by the remote host I went over the code a few times and everything looks fine, some articles suggest the error I'm getting is a server issue but when i try with R-client it works fine
