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
Content-Type: application/x-www-form-urlencoded does not accept None
Content-Type: application/json accepts None
Content-Type: text/xml; User-Agent: xmlrpc does not accept None
I'm particularly interested in letting the Content-Type: application/x-www-form-urlencoded transformer accept None.
The twilio package does arguably unusual requests in some cases: GET with header Content-Type: application/x-www-form-urlencoded. In these cases, the body is None. See
Double checking the exiting transformers defined in vcr.matchers, we see:
Transfer-Encoding: chunked
accepts NoneContent-Type: application/x-www-form-urlencoded
does not accept NoneContent-Type: application/json
accepts NoneContent-Type: text/xml; User-Agent: xmlrpc
does not accept NoneI'm particularly interested in letting the
Content-Type: application/x-www-form-urlencoded
transformer accept None.The twilio package does arguably unusual requests in some cases:
GET
with headerContent-Type: application/x-www-form-urlencoded
. In these cases, the body is None. Seehttps://github.com/twilio/twilio-python/blob/71fb731c9c6356cf08030221d74a900c935109da/twilio/rest/sync/v1/service/sync_map/sync_map_item.py#L734-L740
When trying to record these requests with vcr, it fails with
'NoneType' object has no attribute 'decode'
.If I change matchers.py as follows:
then I can successfully record an interaction. For the twilio package code mentioned above, a recorded interaction will then look like:
Do you agree with the proposed change? I'll be happy to submit a PR.
The text was updated successfully, but these errors were encountered: