{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/cpprestsdk/issues/110","repository_url":"https://api.github.com/repos/Microsoft/cpprestsdk","labels_url":"https://api.github.com/repos/Microsoft/cpprestsdk/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/cpprestsdk/issues/110/comments","events_url":"https://api.github.com/repos/Microsoft/cpprestsdk/issues/110/events","html_url":"https://github.com/Microsoft/cpprestsdk/issues/110","id":144283226,"number":110,"title":"Please add interface to allow a second response stream to be specified when HTTP status code indicates error","user":{"login":"hanzhumsft","id":9128216,"avatar_url":"https://avatars.githubusercontent.com/u/9128216?v=3","gravatar_id":"","url":"https://api.github.com/users/hanzhumsft","html_url":"https://github.com/hanzhumsft","followers_url":"https://api.github.com/users/hanzhumsft/followers","following_url":"https://api.github.com/users/hanzhumsft/following{/other_user}","gists_url":"https://api.github.com/users/hanzhumsft/gists{/gist_id}","starred_url":"https://api.github.com/users/hanzhumsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanzhumsft/subscriptions","organizations_url":"https://api.github.com/users/hanzhumsft/orgs","repos_url":"https://api.github.com/users/hanzhumsft/repos","events_url":"https://api.github.com/users/hanzhumsft/events{/privacy}","received_events_url":"https://api.github.com/users/hanzhumsft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-29T14:34:29Z","updated_at":"2016-03-29T14:34:29Z","closed_at":null,"body":"The `web::http::http_request` has a method to allow user set response stream which will be filled with response content.  However, no matter whether the HTTP status code indicates success (e.g. 2xx) or error (4xx, 5xx), the response content is always stored in this response stream.\r\n\r\nIdeally, if the response coming with 4xx is the error message that needs different treatment, it'd be better to store it to another stream so that the response stream setup for expected content is not polluted.  Especially when the stream is part of a pipeline, its content being instantly going to the next stage."}}