{"action":"opened","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2684","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2684/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2684/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2684/events","html_url":"https://github.com/kennethreitz/requests/issues/2684","id":96443817,"number":2684,"title":"[Request] Simple argument to limit the size of a downloaded resource","user":{"login":"SpokeNode","id":7551671,"avatar_url":"https://avatars.githubusercontent.com/u/7551671?v=3","gravatar_id":"","url":"https://api.github.com/users/SpokeNode","html_url":"https://github.com/SpokeNode","followers_url":"https://api.github.com/users/SpokeNode/followers","following_url":"https://api.github.com/users/SpokeNode/following{/other_user}","gists_url":"https://api.github.com/users/SpokeNode/gists{/gist_id}","starred_url":"https://api.github.com/users/SpokeNode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpokeNode/subscriptions","organizations_url":"https://api.github.com/users/SpokeNode/orgs","repos_url":"https://api.github.com/users/SpokeNode/repos","events_url":"https://api.github.com/users/SpokeNode/events{/privacy}","received_events_url":"https://api.github.com/users/SpokeNode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T00:08:51Z","updated_at":"2015-07-22T00:08:51Z","closed_at":null,"body":"When we use `stream=True` to cap the size of the response, we lose all the bells and whistles of the response object once the response is consumed. For instance, we can no longer return the response to the caller then inspect `status_code`.\r\n\r\nIn keeping with *simple is beautiful*, it would be terrific if we could do:\r\n\r\n`requests.get(url, max_response_size=1024*1024)`\r\n\r\nThanks in advance for considering it. :)"}}