-
-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Description
from httpretty import HTTPretty
import requests
with HTTPretty.record("image.json", allow_net_connect=True):
requests.get("https://httpbin.org/image/jpeg")This raises UnicodeDecodeError because the record method is always trying to decode the response body.
https://github.com/gabrielfalcao/HTTPretty/blob/main/httpretty/core.py#L1540
I assume the same thing will happen if I try to record a POST request with binary data because of:
https://github.com/gabrielfalcao/HTTPretty/blob/main/httpretty/core.py#L1535
Metadata
Metadata
Assignees
Labels
No labels