mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Add a read_body helper function
This commit is contained in:
@@ -85,3 +85,8 @@ def compose(*functions):
|
||||
res = function(res)
|
||||
return res
|
||||
return composed
|
||||
|
||||
def read_body(request):
|
||||
if hasattr(request.body, 'read'):
|
||||
return request.body.read()
|
||||
return request.body
|
||||
|
||||
Reference in New Issue
Block a user