Skip to content
Myr

[change] change doctest based on LuckyDenis suggestion

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

authored by aless10 · committed by aless10 · parent 8b773a4 · Browse files · 1 file+11 added−2 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+11 added−2 removed

  • other:+11 added−2 removed

1 file+11 added−2 removed

modified:requests/__init__.py+11 added-2 removed
21 unmodified lines
22... or POST:2324 >>> payload = dict(key1='value1', key2='value2')25 >>> r = requests.post('https://httpbin.org/post', data=payload)26 >>> r.json()27 {'args': {}, 'data': '', 'files': {}, 'form': {'key1': 'value1', 'key2': 'value2'}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '23', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/...'}, 'json': None, 'origin': '...', 'url': 'https://httpbin.org/post'}26 >>> print(r.text)27 ... # doctest: +ELLIPSIS28 ... # doctest: +NORMALIZE_WHITESPACE29 {30 ...31 "form": {32 "key1": "value1",33 "key2": "value2"34 },35 ...36 }3738The other HTTP methods are supported - see `requests.api`. Full documentation39is at <http://python-requests.org>.40
93 unmodified lines