2

Good evening,

I'm trying to set HTTP Header "Connection" to "keep-alive" this way:

client.AddDefaultHeader("Connection", "keep-alive");

or

client.ConfigureWebRequest(r =>
{
    r.KeepAlive = true;
});

or both ways.

But nothing seems to be working. Charles keeps telling me that there is not "Connection" header in my requests. RestSharp sets Keep-Alive header for GET requests automatically, but I don't have any ideas how to do it for POST.

J. Morgenthal
  • 21
  • 1
  • 3
  • 1
    Possible duplicate of [Set 'Content-Type' header using RestSharp](https://stackoverflow.com/questions/17815065/set-content-type-header-using-restsharp) – Azaz ul Haq Jan 26 '19 at 16:31

0 Answers0