{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/31772","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/31772/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/31772/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/31772/events","html_url":"https://github.com/dotnet/corefx/issues/31772","id":350657456,"node_id":"MDU6SXNzdWUzNTA2NTc0NTY=","number":31772,"title":".net core .net framework HttpWebRequest ","user":{"login":"a641545621","id":33652128,"node_id":"MDQ6VXNlcjMzNjUyMTI4","avatar_url":"https://avatars2.githubusercontent.com/u/33652128?v=4","gravatar_id":"","url":"https://api.github.com/users/a641545621","html_url":"https://github.com/a641545621","followers_url":"https://api.github.com/users/a641545621/followers","following_url":"https://api.github.com/users/a641545621/following{/other_user}","gists_url":"https://api.github.com/users/a641545621/gists{/gist_id}","starred_url":"https://api.github.com/users/a641545621/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a641545621/subscriptions","organizations_url":"https://api.github.com/users/a641545621/orgs","repos_url":"https://api.github.com/users/a641545621/repos","events_url":"https://api.github.com/users/a641545621/events{/privacy}","received_events_url":"https://api.github.com/users/a641545621/received_events","type":"User","site_admin":false},"labels":[{"id":178058848,"node_id":"MDU6TGFiZWwxNzgwNTg4NDg=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net","name":"area-System.Net","color":"d4c5f9","default":false},{"id":145399955,"node_id":"MDU6TGFiZWwxNDUzOTk5NTU=","url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5","default":true},{"id":174911469,"node_id":"MDU6TGFiZWwxNzQ5MTE0Njk=","url":"https://api.github.com/repos/dotnet/corefx/labels/needs%20more%20info","name":"needs more info","color":"eb6420","default":false},{"id":181727851,"node_id":"MDU6TGFiZWwxODE3Mjc4NTE=","url":"https://api.github.com/repos/dotnet/corefx/labels/tenet-compatibility","name":"tenet-compatibility","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-15T01:46:53Z","updated_at":"2018-08-15T07:07:49Z","closed_at":null,"author_association":"NONE","body":"```c#\r\nclass Program \r\n{ \r\nstatic void Main（string [] args）\r\n{ \r\nstring msg = HttpConnectToServer（“ https://www.okex.com/api/v1/exchange_rate.do ”）; \r\nConsole.WriteLine（“核心：”+ MSG）; \r\nConsole.ReadKey（）; \r\n} \r\n私人静态字符串HttpConnectToServer（字符串URL）\r\n{ \r\n//创建请求\r\n的HttpWebRequest的请求=（HttpWebRequest的的）HttpWebRequest.Create（URL）; \r\nrequest.Method =“GET”;\r\n\r\n        //读取返回消息\r\n        string res = string.Empty;\r\n        try\r\n        {\r\n            HttpWebResponse response = (HttpWebResponse)request.GetResponse();\r\n            StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);\r\n            res = reader.ReadToEnd();\r\n            reader.Close();\r\n        }\r\n        catch (Exception ex)\r\n        {\r\n            return ex.ToString();\r\n            //连接服务器失败\r\n        }\r\n        return res;\r\n    }\r\n}\r\n```\r\n\r\n.net core 2.1 Request failed\r\n.net core 2.0 Request successfully\r\n![1](https://user-images.githubusercontent.com/33652128/44127479-0e04fc64-a070-11e8-9132-b106b942bfb4.jpg)\r\n![2](https://user-images.githubusercontent.com/33652128/44127480-0e684486-a070-11e8-919c-4eb5f2547be7.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/413113128","html_url":"https://github.com/dotnet/corefx/issues/31772#issuecomment-413113128","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/31772","id":413113128,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzExMzEyOA==","user":{"login":"a641545621","id":33652128,"node_id":"MDQ6VXNlcjMzNjUyMTI4","avatar_url":"https://avatars2.githubusercontent.com/u/33652128?v=4","gravatar_id":"","url":"https://api.github.com/users/a641545621","html_url":"https://github.com/a641545621","followers_url":"https://api.github.com/users/a641545621/followers","following_url":"https://api.github.com/users/a641545621/following{/other_user}","gists_url":"https://api.github.com/users/a641545621/gists{/gist_id}","starred_url":"https://api.github.com/users/a641545621/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a641545621/subscriptions","organizations_url":"https://api.github.com/users/a641545621/orgs","repos_url":"https://api.github.com/users/a641545621/repos","events_url":"https://api.github.com/users/a641545621/events{/privacy}","received_events_url":"https://api.github.com/users/a641545621/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T07:07:49Z","updated_at":"2018-08-15T07:07:49Z","author_association":"NONE","body":"example:https://github.com/a641545621/httpHttpWebRequest--core   "}}
{"actor":{"display_login":"a641545621"}}