Skip to content
Myr

Docs: Add more section labels for referencing

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

so sections can be linked from other projects using Intersphinx

authored by Dan Michael O. Heggø · committed by Dan Michael O. Heggø · parent 9dc6602 · Browse files · 1 file+13 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+13 added−0 removed

  • other:+13 added−0 removed

1 file+13 added−0 removed

modified:docs/user/advanced.rst+13 added
3 unmodified lines
4==============56This document covers some of Requests more advanced features.78.. _session-objects:910Session Objects11---------------12
37 unmodified lines
5051All values that are contained within a session are directly available to you.52See the :ref:`Session API Docs <sessionapi>` to learn more.5354.. _request-and-response-objects:5556Request and Response Objects57----------------------------5859Whenever a call is made to ``requests.get()`` and friends you are doing two
24 unmodified lines
84 >>> r.request.headers85 {'Accept-Encoding': 'identity, deflate, compress, gzip',86 'Accept': '*/*', 'User-Agent': 'python-requests/1.2.0'}8788.. _prepared-requests:8990Prepared Requests91-----------------9293Whenever you receive a :class:`Response <requests.Response>` object
99 unmodified lines
193194 >>> requests.get('https://kennethreitz.com', cert='/wrong_path/server.pem')195 SSLError: [Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib196197.. _body-content-workflow:198199Body Content Workflow200---------------------201
31 unmodified lines
233 # Do things with the response here.234235.. _`documented here`: http://docs.python.org/2/library/contextlib.html#contextlib.closing236237.. _keep-alive:238239Keep-Alive240----------241
4 unmodified lines
246Note that connections are only released back to the pool for reuse once all body247data has been read; be sure to either set ``stream`` to ``False`` or read the248``content`` property of the ``Response`` object.249250.. _streaming-uploads:251252Streaming Uploads253-----------------254
3 unmodified lines
258259 with open('massive-body', 'rb') as f:260 requests.post('http://some.url/streamed', data=f)261262.. _chunk-encoding:263264Chunk-Encoded Requests265----------------------266
8 unmodified lines
275276 requests.post('http://some.url/chunked', data=gen())277278279.. _multipart:280281POST Multiple Multipart-Encoded Files282-------------------------------------283
15 unmodified lines
299 'Content-Type': 'multipart/form-data; boundary=3131623adb2043caaeb5538cc7aa0b3a',300 ...301 }302303.. _event-hooks:304305Event Hooks306-----------307
31 unmodified lines
339 >>> requests.get('http://httpbin.org', hooks=dict(response=print_url))340 http://httpbin.org341 <Response [200]>342343.. _custom-auth:344345Custom Authentication346---------------------347
50 unmodified lines
398 # filter out keep-alive new lines399 if line:400 print(json.loads(line))401402.. _proxies:403404Proxies405-------406
392 unmodified lines