{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/7037","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/7037/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7037/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/7037/events","html_url":"https://github.com/dotnet/corefx/issues/7037","id":141955132,"number":7037,"title":"Cannot reuse HttpClient ","user":{"login":"quoctruong","id":4371645,"avatar_url":"https://avatars.githubusercontent.com/u/4371645?v=3","gravatar_id":"","url":"https://api.github.com/users/quoctruong","html_url":"https://github.com/quoctruong","followers_url":"https://api.github.com/users/quoctruong/followers","following_url":"https://api.github.com/users/quoctruong/following{/other_user}","gists_url":"https://api.github.com/users/quoctruong/gists{/gist_id}","starred_url":"https://api.github.com/users/quoctruong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quoctruong/subscriptions","organizations_url":"https://api.github.com/users/quoctruong/orgs","repos_url":"https://api.github.com/users/quoctruong/repos","events_url":"https://api.github.com/users/quoctruong/events{/privacy}","received_events_url":"https://api.github.com/users/quoctruong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"davidsh","id":7684835,"avatar_url":"https://avatars.githubusercontent.com/u/7684835?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsh","html_url":"https://github.com/davidsh","followers_url":"https://api.github.com/users/davidsh/followers","following_url":"https://api.github.com/users/davidsh/following{/other_user}","gists_url":"https://api.github.com/users/davidsh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsh/subscriptions","organizations_url":"https://api.github.com/users/davidsh/orgs","repos_url":"https://api.github.com/users/davidsh/repos","events_url":"https://api.github.com/users/davidsh/events{/privacy}","received_events_url":"https://api.github.com/users/davidsh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":530,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2016-03-18T19:46:25Z","due_on":"2016-04-08T07:00:00Z","closed_at":null},"comments":2,"created_at":"2016-03-18T19:15:20Z","updated_at":"2016-03-18T19:57:11Z","closed_at":null,"body":"If I have the following HttpClient:\r\n\r\n```\r\nvar handler = new HttpClientHandler();\r\nhandler.UseDefaultCredentials = true;\r\nhandler.Proxy = WebRequest.DefaultWebProxy;\r\nvar client = new HttpClient(handler);\r\nclient.DefaultRequestHeaders.TryAddWithoutValidation(\"User-Agent\", \"Mozilla/5.0 Bla\")\r\n```\r\n\r\nThe first time I use this client (with `client.GetAsync(\"http://www.nuget.org/api/v2\")`), I will get back the correct result. However, if I reuse the client, I will get an exception:\r\n```\r\nSystem.PlatformNotSupportedException: Operation is not supported on this platform.\r\n                            at System.Net.SystemWebProxy.IsBypassed(Uri host)\r\n                            at System.Net.Http.WinHttpHandler.SetRequestHandleProxyOptions(RequestState state)\r\n                            at System.Net.Http.WinHttpHandler.SetRequestHandleOptions(RequestState state)\r\n                            at System.Net.Http.WinHttpHandler.<StartRequest>d__1.MoveNext()\r\n```\r\n\r\nIs this a bug on CoreClr? Do I have to create new instance of HttpClient everytime?"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/198518341","html_url":"https://github.com/dotnet/corefx/issues/7037#issuecomment-198518341","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/7037","id":198518341,"user":{"login":"davidsh","id":7684835,"avatar_url":"https://avatars.githubusercontent.com/u/7684835?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsh","html_url":"https://github.com/davidsh","followers_url":"https://api.github.com/users/davidsh/followers","following_url":"https://api.github.com/users/davidsh/following{/other_user}","gists_url":"https://api.github.com/users/davidsh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsh/subscriptions","organizations_url":"https://api.github.com/users/davidsh/orgs","repos_url":"https://api.github.com/users/davidsh/repos","events_url":"https://api.github.com/users/davidsh/events{/privacy}","received_events_url":"https://api.github.com/users/davidsh/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T19:57:11Z","updated_at":"2016-03-18T19:57:11Z","body":"cc: @SidharthNabar @stephentoub "}}