api.rst
This file
Path
docs/api.rst
133 lines · 2.2 KiB
Last changed by
requestKenneth Reitzbefore adoptionaa3347b
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---------------------2223.. autoclass:: requests.Request24 :inherited-members:2526.. autoclass:: Response27 :inherited-members:2829---------------------3031.. autofunction:: head32.. autofunction:: get33.. autofunction:: post34.. autofunction:: put35.. autofunction:: patch36.. autofunction:: delete373839-----------------4041.. autofunction:: session4243.. autoclass:: Session44 :inherited-members:45464748Exceptions49~~~~~~~~~~5051.. module:: requests5253.. autoexception:: RequestException54.. autoexception:: ConnectionError55.. autoexception:: HTTPError56.. autoexception:: URLRequired57.. autoexception:: TooManyRedirects585960.. _configurations:6162Configurations63--------------6465.. automodule:: requests.defaults666768Utilities69---------7071These functions are used internally, but may be useful outside of72Requests.7374.. module:: requests.utils7576Status Code Lookup77~~~~~~~~~~~~~~~~~~7879.. autofunction:: requests.codes8081::8283 >>> requests.codes['temporary_redirect']84 3078586 >>> requests.codes.teapot87 4188889 >>> requests.codes['\o/']90 2009192Cookies93~~~~~~~9495.. autofunction:: dict_from_cookiejar96.. autofunction:: cookiejar_from_dict97.. autofunction:: add_dict_to_cookiejar9899100Encodings101~~~~~~~~~102103.. autofunction:: get_encodings_from_content104.. autofunction:: get_encoding_from_headers105.. autofunction:: get_unicode_from_response106.. autofunction:: decode_gzip107108109Internals110---------111112These items are an internal component to Requests, and should never be113seen by the end user (developer). This part of the API documentation114exists for those who are extending the functionality of Requests.115116117Classes118~~~~~~~119120.. autoclass:: requests.Response121 :inherited-members:122123.. autoclass:: requests.Request124 :inherited-members:125126.. autoclass:: requests.PreparedRequest127 :inherited-members:128129.. _sessionapi:130131.. autoclass:: requests.Session132 :inherited-members:133