mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 17:15:35 +00:00
Handle empty body
This commit is contained in:
committed by
Kevin McCarthy
parent
ecbc192fc4
commit
31b0e825b5
@@ -49,6 +49,7 @@ def _transform_json(body):
|
||||
# Request body is always a byte string, but json.loads() wants a text
|
||||
# string. RFC 7159 says the default encoding is UTF-8 (although UTF-16
|
||||
# and UTF-32 are also allowed: hmmmmm).
|
||||
if body:
|
||||
return json.loads(body.decode('utf-8'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user