]> git.ipfire.org Git - thirdparty/httpx.git/commit
Event hooks (#1246)
authorTom Christie <tom@tomchristie.com>
Tue, 15 Sep 2020 11:05:39 +0000 (12:05 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Sep 2020 11:05:39 +0000 (12:05 +0100)
commit54f7708e2b8bc9bbd5f4ea9f1e4386b8acbf3811
treef86adfdaada2f934a295d7cee2c98fa5cfc95a60
parentd0fe1139458f5636bcdc1dafd8b5bda5e845731a
Event hooks (#1246)

* Add EventHooks internal datastructure

* Add support for 'request' and 'response' event hooks

* Support Client.event_hooks property

* Handle exceptions raised by response event hooks

* Docs for event hooks

* Only support 'request' and 'response' event hooks

* Add event_hooks to top-level API

* Event hooks

* Formatting

* Formatting

* Fix up event hooks test

* Add test case to confirm that redirects/event hooks don't currently play together correctly

* Refactor test cases

* Make response.request clear in response event hooks docs

* Drop merge marker

* Request event hook runs as soon as we have an auth-constructed request
docs/advanced.md
httpx/_client.py
tests/client/test_event_hooks.py [new file with mode: 0644]
tests/client/test_properties.py