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
recorder: set content_type for Response in Recorder._on_request
Recorder._on_request does not set the content_type parameter when
creating a new Response instance. When content_type is not set the
Response.__init__ will always set the value to "text/plain". This means
the recording file is always written with that content type and when
responses are replayed they may not have their original content-type
header value.
For example, the python-gitlab package expects the response header
content type to be 'application/json' but this information is in the
recording and playing it back will fail.
Fix this by having _on_request() pass in the content_type of the
requests_response.header.
Signed-off-by: Patrick Talbert <[email protected]>
0 commit comments