diff --git a/docs/compatibility.md b/docs/compatibility.md index 56476711..c8a074e4 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -135,3 +135,11 @@ while request is not None: response = client.send(request, allow_redirects=False) request = response.next_request ``` + +## Event Hooks + +`requests` allows event hooks to mutate `Request` and `Response` objects. See [examples](https://requests.readthedocs.io/en/master/user/advanced/#event-hooks) given in the documentation for `requests`. + +In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response. + +If you are looking for more control, consider checking out [Custom Transports](advanced.md#custom-transports).