Created
March 27, 2013 08:55
-
-
Save shiftkey/5252788 to your computer and use it in GitHub Desktop.
Set a proxy on HttpClient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var proxy = new WebProxy {Address = new Uri("http://someurl/")}; | |
var handler = new WebRequestHandler {Proxy = proxy}; | |
var client = new HttpClient(handler); | |
client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "http://otherurl/")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment