开发者

How KeepAlive HTTP header should look like in a sniffer?

开发者 https://www.devze.com 2023-01-05 14:43 出处:网络
I am trying to make Http connections made by C# HttpClient helper class reusable. I read that there is KeepAlive header which has to be present in Http request.

I am trying to make Http connections made by C# HttpClient helper class reusable. I read that there is KeepAlive header which has to be present in Http request.

I sniffed the traffic and I cant find any reference to KeepAlive.

It has GET and it has HTTP/1.1 st开发者_C百科rings in there. No KeepAlive no nothing.

P.S. I also tried to find KeepAlive property somewhere on HttpClient but couldnt...

Any ideas?


It should have a Connection header, which looks like this:

  • Connection: Close
  • Connection: Keep-Alive

The keep-alive header looks like this:

  • Keep-Alive: 115
0

精彩评论

暂无评论...
验证码 换一张
取 消