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 fileTake it
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--------------1516All of Request's functionality can be accessed by these 7 methods.17They all return an instance of the :class:`Response <Response>` object.1819.. autofunction:: request2021---------------------222324.. autoclass:: Response25 :inherited-members:2627---------------------2829.. autofunction:: head30.. autofunction:: get31.. autofunction:: post32.. autofunction:: put33.. autofunction:: patch34.. autofunction:: delete353637-----------------3839.. autofunction:: session40414243Exceptions44~~~~~~~~~~4546.. module:: requests4748.. autoexception:: RequestException49.. autoexception:: ConnectionError50.. autoexception:: HTTPError51.. autoexception:: URLRequired52.. autoexception:: TooManyRedirects535455.. _configurations:5657Configurations58--------------5960.. automodule:: requests.defaults616263.. _async:6465Async66-----6768.. module:: requests.async697071.. autofunction:: map72.. autofunction:: request73.. autofunction:: head74.. autofunction:: get75.. autofunction:: post76.. autofunction:: put77.. autofunction:: patch78.. autofunction:: delete79808182Utilities83---------8485These functions are used internally, but may be useful outside of86Requests.8788.. module:: requests.utils8990Status Code Lookup91~~~~~~~~~~~~~~~~~~9293.. autofunction:: requests.codes9495::9697 >>> requests.codes['temporary_redirect']98 30799100 >>> requests.codes.teapot101 418102103 >>> requests.codes['\o/']104 200105106Cookies107~~~~~~~108109.. autofunction:: dict_from_cookiejar110.. 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_gzip121122123Internals124---------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.129130131Classes132~~~~~~~133134.. autoclass:: requests.Response135 :inherited-members:136137.. autoclass:: requests.Request138 :inherited-members:139140.. _sessionapi:141142.. autoclass:: requests.Session143 :inherited-members:144