Skip to content
Myr

Fix #1322: Add note in docs about None not being sent as data

Before adoption: this commit came in with the history the project adopted, so no landing records it.

In the case: payload = {'key1': 'value1', 'key2': 'value2', 'key3': None} r = requests.get("http://httpbin.org", params=payload) the parameter `key3` will not be sent as a parameter in the URL. Mention this in the documentation.

authored by David Pursehouse · committed by David Pursehouse · parent e4b4132 · Browse files · 1 file+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:docs/user/quickstart.rst+3 added
69 unmodified lines
7071 >>> print r.url72 u'http://httpbin.org/get?key2=value2&key1=value1'7374Note that any dictionary key whose value is ``None`` will not be added to the75URL's query string.767778Response Content79----------------8081We can read the content of the server's response. Consider the GitHub timeline
340 unmodified lines