Skip to content
Myr

Merge pull request #2730 from bmispelon/doc-codeblock-fix

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

Fixed minor rendering issue in documentation code blocks

authored by Ian Cordasco · committed by Ian Cordasco · parents 3cf4ec4, 7197afa · Browse files · 1 file+3 added−3 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−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/user/quickstart.rst+3 added-3 removed
226 unmodified lines
227 >>> url = 'https://api.github.com/some/endpoint'228 >>> payload = {'some': 'data'}229230 >>> r = requests.post(url, data=json.dumps(payload))231 231232Instead of encoding the ``dict`` yourself, you can also pass it directly using233the ``json`` parameter (added in version 2.4.2) and it will be encoded automatically:233the ``json`` parameter (added in version 2.4.2) and it will be encoded automatically::234235 >>> import json236 >>> url = 'https://api.github.com/some/endpoint'237 >>> payload = {'some': 'data'}
18 unmodified lines
256 },257 ...258 }259260You can set the filename, content_type and headers explicitly:260You can set the filename, content_type and headers explicitly::261262 >>> url = 'http://httpbin.org/post'263 >>> files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}264
216 unmodified lines