You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Callbacks are now expected to return a httpx.Response instance instead of the previous httpcore.Response tuple. As a consequence, pytest_httpx.to_response now returns a httpx.Response instance.
Added
httpx_mock.add_response now allows to explicitly provide bytes using content parameter.
httpx_mock.add_response now allows to explicitly provide string using text parameter.
httpx_mock.add_response now allows to explicitly provide HTML string content using html parameter.
httpx_mock.add_response now allows to explicitly provide streamed content using stream parameter and the new pytest_httpx.IteratorStream class.
Deprecated
pytest_httpx.to_response is now deprecated in favor of httpx.Response. This function will be removed in a future release.
httpx_mock.add_responsedata parameter should now only be used for multipart content. Instead, use the appropriate parameter amongst content, text, html or stream.