{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/3089","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/3089/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/3089/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/3089/events","html_url":"https://github.com/PowerShell/PowerShell/pull/3089","id":205052994,"number":3089,"title":"error message and status code in the Invoke-WebRequest cmdlet [Fixes#…","user":{"login":"2xmax","id":2508022,"avatar_url":"https://avatars.githubusercontent.com/u/2508022?v=3","gravatar_id":"","url":"https://api.github.com/users/2xmax","html_url":"https://github.com/2xmax","followers_url":"https://api.github.com/users/2xmax/followers","following_url":"https://api.github.com/users/2xmax/following{/other_user}","gists_url":"https://api.github.com/users/2xmax/gists{/gist_id}","starred_url":"https://api.github.com/users/2xmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2xmax/subscriptions","organizations_url":"https://api.github.com/users/2xmax/orgs","repos_url":"https://api.github.com/users/2xmax/repos","events_url":"https://api.github.com/users/2xmax/events{/privacy}","received_events_url":"https://api.github.com/users/2xmax/received_events","type":"User","site_admin":false},"labels":[{"id":427063085,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/cla-already-signed","name":"cla-already-signed","color":"009800","default":false},{"id":486892834,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Review%20-%20Needed","name":"Review - Needed","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-03T02:02:37Z","updated_at":"2017-02-08T16:51:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/3089","html_url":"https://github.com/PowerShell/PowerShell/pull/3089","diff_url":"https://github.com/PowerShell/PowerShell/pull/3089.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/3089.patch"},"body":"fixes [#2113](https://github.com/PowerShell/PowerShell/issues/2113)\r\n\r\n**before the change (in CoreCLR)**:\r\n```\r\nPS C:\\>  Invoke-RestMethod http://httpbin.org/status/418\r\nInvoke-RestMethod : Response status code does not indicate success: 418 (I'M A\r\nTEAPOT).\r\nPS C:\\> $error[0].Exception.Response\r\n(nothing)\r\n```\r\n**after the change**\r\n```\r\nPS C:\\> Invoke-RestMethod http://httpbin.org/status/418\r\nInvoke-RestMethod :\r\n    -=[ teapot ]=-\r\n       _...._\r\n     .'  _ _ `.\r\n    | .\"` ^ `\". _,\r\n    \\_;`\"---\"`|//\r\n      |       ;/\r\n      \\_     _/\r\n        `\"\"\"`\r\nAt line:1 char:1...\r\nPS C:\\> $error[0].Exception.Response\r\nVersion             : 1.1\r\nContent             : System.Net.Http.StreamContent\r\nStatusCode          : 418\r\nReasonPhrase        : I'M A TEAPOT\r\nHeaders             : {[Connection, System.String[]], [Date, System.String[]],\r\n                      [Server, System.String[]], [Access-Control-Allow-Origin,\r\n                      System.String[]]...}\r\nRequestMessage      : Method: GET, RequestUri:\r\n                      'http://httpbin.org/status/418', Version: 1.1, Content:\r\n                      <null>, Headers:\r\n                      {...\r\nPS C:\\> Invoke-RestMethod http://httpbin.org/status/500\r\nInvoke-RestMethod : The remote server returned an error: (500) INTERNAL SERVER ERROR.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/278386805","html_url":"https://github.com/PowerShell/PowerShell/pull/3089#issuecomment-278386805","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/3089","id":278386805,"user":{"login":"PaulHigin","id":14019529,"avatar_url":"https://avatars.githubusercontent.com/u/14019529?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulHigin","html_url":"https://github.com/PaulHigin","followers_url":"https://api.github.com/users/PaulHigin/followers","following_url":"https://api.github.com/users/PaulHigin/following{/other_user}","gists_url":"https://api.github.com/users/PaulHigin/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulHigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulHigin/subscriptions","organizations_url":"https://api.github.com/users/PaulHigin/orgs","repos_url":"https://api.github.com/users/PaulHigin/repos","events_url":"https://api.github.com/users/PaulHigin/events{/privacy}","received_events_url":"https://api.github.com/users/PaulHigin/received_events","type":"User","site_admin":false},"created_at":"2017-02-08T16:51:59Z","updated_at":"2017-02-08T16:51:59Z","body":"Thanks.  LGTM."}}
{"actor":{"display_login":"PaulHigin"}}