1
0
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:
Diaoul
2015-07-15 01:16:10 +02:00
parent c0286dfd97
commit a046697567
2 changed files with 9 additions and 10 deletions

View File

@@ -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