mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Clarify that a Session can have multiple hooks
This commit is contained in:
@@ -458,8 +458,8 @@ Let's print some request method arguments at runtime::
|
||||
http://httpbin.org
|
||||
<Response [200]>
|
||||
|
||||
You can also assign hooks to a ``Session`` instance. The hook will then be
|
||||
called on every request made to the session. For example::
|
||||
You can also add hooks to a ``Session`` instance. Any hooks you add will then
|
||||
be called on every request made to the session. For example::
|
||||
|
||||
>>> s = requests.Session()
|
||||
>>> s.hooks['response'].append(print_url)
|
||||
@@ -467,6 +467,9 @@ called on every request made to the session. For example::
|
||||
http://httpbin.org
|
||||
<Response [200]>
|
||||
|
||||
A ``Session`` can have multiple hooks, which will be called in the order
|
||||
they are added.
|
||||
|
||||
.. _custom-auth:
|
||||
|
||||
Custom Authentication
|
||||
|
||||
Reference in New Issue
Block a user