socket Exception while making post request on HTTPS server with httpClient

17 Views Asked by At

I am trying to post a byte array to a HTTPS site and I get timeout error. Also Getting very slow response. I am sending multiple packets of byte array, some packed I get status 200 and some packet fails.

here headers is Cnonce calculated for digest authentication

HttpContent contentss = new ByteArrayContent(array1);
contentss.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
httpClient.DefaultRequestHeaders.Authorization = headers;
// httpClient.DefaultRequestHeaders.Add("Connection", "keep-alive");
// contentss.Headers.

var response1 = await httpClient.PostAsync("https://192.168.1.1/fwup_install", contentss);
Console.WriteLine(response1.StatusCode);
Console.WriteLine(response1.Content);
0

There are 0 best solutions below