kennethreitz/requests — pull request #372 by jgorset (2012-01-21 11:15:40+00:00)
Title: Facilitate for multiple hooks

I implemented support for multiple hooks by passing a list of callables:

requests.get(
url = 'http://example.org',
hooks = {
'args': [do_something, do_something_else]
}
)

In the interest of backwards compatibility (but mostly just because I think it's practical),
it remains possible to pass a single hook without encapsulating it in a list:

requests.get(
url = 'http://example.org',
hooks = {
'args': do_something
}
)