diff --git a/docs/api.rst b/docs/api.rst index 5e22814a..42f7c5a0 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -44,6 +44,13 @@ Request Sessions .. autoclass:: requests.adapters.HTTPAdapter :inherited-members: +Authentication +-------------- + +.. autoclass:: requests.auth.AuthBase +.. autoclass:: requests.auth.HTTPBasicAuth +.. autoclass:: requests.auth.HTTPProxyAuth +.. autoclass:: requests.auth.HTTPDigestAuth Exceptions ~~~~~~~~~~ diff --git a/docs/dev/internals.rst b/docs/dev/internals.rst deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/user/authentication.rst b/docs/user/authentication.rst index af43bd29..dd0bf2b8 100644 --- a/docs/user/authentication.rst +++ b/docs/user/authentication.rst @@ -99,7 +99,7 @@ If you can't find a good implementation of the form of authentication you want, you can implement it yourself. Requests makes it easy to add your own forms of authentication. -To do so, subclass :class:`requests.auth.AuthBase` and implement the +To do so, subclass :class:`AuthBase ` and implement the ``__call__()`` method:: >>> import requests diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 6bd82f7d..b1fe9344 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -6,8 +6,7 @@ Quickstart .. module:: requests.models Eager to get started? This page gives a good introduction in how to get started -with Requests. This assumes you already have Requests installed. If you do not, -head over to the :ref:`Installation ` section. +with Requests. First, make sure that: @@ -32,8 +31,8 @@ timeline :: >>> r = requests.get('https://github.com/timeline.json') -Now, we have a :class:`Response` object called ``r``. We can get all the -information we need from this object. +Now, we have a :class:`Request ` object called ``r``. We can +get all the information we need from this object. Requests' simple API means that all forms of HTTP request are as obvious. For example, this is how you make an HTTP POST request:: @@ -286,8 +285,9 @@ reference:: >>> r.status_code == requests.codes.ok True -If we made a bad request (a 4XX client error or 5XX server error response), we can raise it with -:class:`Response.raise_for_status()`:: +If we made a bad request (a 4XX client error or 5XX server error response), we +can raise it with +:meth:`Response.raise_for_status() `:: >>> bad_r = requests.get('http://httpbin.org/status/404') >>> bad_r.status_code