From 5bd40a447a217a83996a2499a2f02ece2e95c246 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 24 Mar 2015 14:08:58 -0700 Subject: [PATCH] Add setter to body on vcr's request. --- vcr/request.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcr/request.py b/vcr/request.py index 26ba917..82eaf6d 100644 --- a/vcr/request.py +++ b/vcr/request.py @@ -37,6 +37,10 @@ class Request(object): def body(self): return StringIO.StringIO(self._body) if self._was_file else self._body + @body.setter + def body(self, value): + self._body = value + def add_header(self, key, value): # see class docstring for an explanation if isinstance(value, (tuple, list)):