Share via

HttpWebRequest.ProtocolVersion - how do I set it to try 1.0, then 1.1 (or vice versa)?

David Thielen 3,231 Reputation points
2020-12-06T23:33:10.243+00:00

We have a commercial library and some of our customers need

HttpWebRequest.ProtocolVersion=HttpVersion.Version10 

and some need

HttpWebRequest.ProtocolVersion=HttpVersion.Version10

Is there a way to tell it to try both? Or do I need to add a configuration setting for the 1.0 people (yuck)?

Also asked on StackOverflow

Developer technologies | .NET | .NET Runtime

1 answer

Sort by: Most helpful
  1. cheong00 3,491 Reputation points Volunteer Moderator
    2020-12-08T03:52:30.89+00:00

    I think the most feasible solution would be to deploy Nginx as forward proxy with your program to visit those URL with "proxy_http_version 1.0", then point the defaultProxy setting of your application to it.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.