requests
requests copied to clipboard
A simple, yet elegant, HTTP library.
I'm not sure this is the right place to do this operation, but it does solve the problem. Or at least it passes the test that I wrote for it....
The original documentation implies that `requests` will close the file for you; this is not the case. Since it is up to the user to release the resources, I think...
**Summary:** Setting `no_proxy` on `requests.com` used to enable it on `somerequests.com` also, which was unexpected and potentially dangerous. (see #4795) Note that this delegates to urllib more often, as stated...
Currently, if there is a read timeout while streaming a response, a `requests.exceptions.ConnectionError` is raised in lieu of a `requests.exceptions.ReadTimeout`. This is unexpected and [contrary to the documentation](http://docs.python-requests.org/en/latest/user/quickstart/#timeouts). As a...
I assume this'd be the most robust way to close off #4926.
Look at https://github.com/kennethreitz/requests/blob/master/requests/models.py#L100 or https://github.com/kennethreitz/requests/blob/master/requests/models.py#L131 ``` for v in vs: if v is not None: ... ``` When the type of `vs` is `dict`, `v` will be the field key,...
A re-write of https://github.com/psf/requests/pull/4935 Addresses: https://github.com/psf/requests/issues/4938 and perhaps others. In short, there are three types of values: the instance values (e.g. those passed in via the `get(...)`, `request(...)`, etc.), the...
Ensure thread-state is initialised on handle_401 Refs #5178
This PR fixes #5140 and #4325 by returning different connection and proxy pools based on the connection parameters for the current request. I tested it with the following code: ```python...
This PR fixes #5021 by replacing a password in the URL with asterisks. Example: ```python import requests r = requests.get("http://foo:[email protected]/status/401") r.raise_for_status() ``` Output: ``` Traceback (most recent call last): File...