diff --git a/src/pook/interceptors/_httpx.py b/src/pook/interceptors/_httpx.py index 2d27266..1f11058 100644 --- a/src/pook/interceptors/_httpx.py +++ b/src/pook/interceptors/_httpx.py @@ -75,6 +75,12 @@ def _get_httpx_response(self, httpx_request, mock_response): request=httpx_request, ) + # Allow to read the response on client side + res.is_stream_consumed = False + res.is_closed = False + if hasattr(res, "_content"): + del res._content + return res