The library raises NoneType error when file-pointer (fp) resolves to None.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
>>> from requests import post >>> r = post("https://example.com", files={"file-name": None}) However, when a param value or json field is None they are not included in the request body. >>> from requests import get >>> r = get("https://example.com", params={"file-name": None}) >>> r.request.url This commit makes the beahviour consistent for files.
authored by Rajiv Mayani · committed by Nate Prewitt · parent 5f09f0c · Browse files · 3 files+14 added−1 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+14 added−1 removed
- tests:+8 added−0 removed
- other:+6 added−1 removed