Skip to content
Myr

api.rst

This file

Path

docs/api.rst

144 lines · 2.3 KiB

Last changed by

Merge pull request #262 from petermanser/patch-1Kenneth Reitzbefore adoption289e813

History of this file

Take it

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 1–15why, one step back
1.. _api:
23API4===56.. module:: requests78This part of the documentation covers all the interfaces of Requests. For9parts where Requests depends on external libraries, we document the most10important right here and provide links to the canonical documentation.111213Main Interface14--------------15

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

lines 16–17why, one step back
16All of Request's functionality can be accessed by these 7 methods.
17They all return an instance of the :class:`Response <Response>` object.

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 18why, one step back
18

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 19why, one step back
19.. autofunction:: request

better api docsKenneth Reitzbefore adoption53bf544

lines 20–28why, one step back
20
21---------------------222324.. autoclass:: Response25 :inherited-members:2627---------------------28

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 29why, one step back
29.. autofunction:: head

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 30–32why, one step back
30.. autofunction:: get
31.. autofunction:: post32.. autofunction:: put

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 33why, one step back
33.. autofunction:: patch

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 34why, one step back
34.. autofunction:: delete

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 35why, one step back
35

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 36why, one step back
36

better api docsKenneth Reitzbefore adoption53bf544

line 37why, one step back
37-----------------

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 38why, one step back
38

better api docsKenneth Reitzbefore adoption53bf544

line 39why, one step back
39.. autofunction:: session

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 40–41why, one step back
40
41

better api docsKenneth Reitzbefore adoption53bf544

lines 42–54why, one step back
42
43Exceptions44~~~~~~~~~~4546.. module:: requests4748.. autoexception:: RequestException49.. autoexception:: ConnectionError50.. autoexception:: HTTPError51.. autoexception:: URLRequired52.. autoexception:: TooManyRedirects5354

better stepping for elastic designKenneth Reitzbefore adoptiona0c3570

line 55why, one step back
55.. _configurations:

better api docsKenneth Reitzbefore adoption53bf544

lines 56–62why, one step back
56
57Configurations58--------------5960.. automodule:: requests.defaults6162

better stepping for elastic designKenneth Reitzbefore adoptiona0c3570

line 63why, one step back
63.. _async:

better api docsKenneth Reitzbefore adoption53bf544

line 64why, one step back
64

Merge branch 'develop' into feature/rewriteKenneth Reitzbefore adoption95336a0

lines 65–66why, one step back
65Async
66-----

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 67why, one step back
67

Merge branch 'develop' into feature/rewriteKenneth Reitzbefore adoption95336a0

line 68why, one step back
68.. module:: requests.async

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 69why, one step back
69

Merge branch 'develop' into feature/rewriteKenneth Reitzbefore adoption95336a0

lines 70–81why, one step back
70
71.. autofunction:: map72.. autofunction:: request73.. autofunction:: head74.. autofunction:: get75.. autofunction:: post76.. autofunction:: put77.. autofunction:: patch78.. autofunction:: delete798081

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

lines 82–83why, one step back
82Utilities
83---------

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 84why, one step back
84

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

lines 85–86why, one step back
85These functions are used internally, but may be useful outside of
86Requests.

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 87why, one step back
87

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 88why, one step back
88.. module:: requests.utils

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 89why, one step back
89

better api docsKenneth Reitzbefore adoption53bf544

lines 90–97why, one step back
90Status Code Lookup
91~~~~~~~~~~~~~~~~~~9293.. autofunction:: requests.codes9495::9697 >>> requests.codes['temporary_redirect']

Merge pull request #262 from petermanser/patch-1Kenneth Reitzbefore adoption289e813

line 98why, one step back
98 307

better api docsKenneth Reitzbefore adoption53bf544

lines 99–100why, one step back
99
100 >>> requests.codes.teapot

Merge pull request #262 from petermanser/patch-1Kenneth Reitzbefore adoption289e813

line 101why, one step back
101 418

better api docsKenneth Reitzbefore adoption53bf544

lines 102–103why, one step back
102
103 >>> requests.codes['\o/']

Merge pull request #262 from petermanser/patch-1Kenneth Reitzbefore adoption289e813

line 104why, one step back
104 200

better api docsKenneth Reitzbefore adoption53bf544

line 105why, one step back
105

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

lines 106–107why, one step back
106Cookies
107~~~~~~~

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 108why, one step back
108

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

lines 109–122why, one step back
109.. autofunction:: dict_from_cookiejar
110.. autofunction:: cookiejar_from_dict111.. autofunction:: add_dict_to_cookiejar112113114Encodings115~~~~~~~~~116117.. autofunction:: get_encodings_from_content118.. autofunction:: get_encoding_from_headers119.. autofunction:: get_unicode_from_response120.. autofunction:: decode_gzip121122

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 123–129why, one step back
123Internals
124---------125126These items are an internal component to Requests, and should never be127seen by the end user (developer). This part of the API documentation128exists for those who are extending the functionality of Requests.129

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 130why, one step back
130

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 131–133why, one step back
131Classes
132~~~~~~~133

better api docsKenneth Reitzbefore adoption53bf544

lines 134–136why, one step back
134.. autoclass:: requests.Response
135 :inherited-members:136

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 137why, one step back
137.. autoclass:: requests.Request

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 138why, one step back
138 :inherited-members:

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 139why, one step back
139

refKenneth Reitzbefore adoptiondfbfb23

lines 140–141why, one step back
140.. _sessionapi:
141

better api docsKenneth Reitzbefore adoption53bf544

lines 142–143why, one step back
142.. autoclass:: requests.Session
143 :inherited-members:

Migrate new docs over.Kenneth Reitzbefore adoption4a7fdef

line 144why, one step back
144