Skip to content
Myr

attach request object to responses

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 10cc467 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:requests/models.py+3 added-1 removed
217 unmodified lines
218219 r.history = history220221 self.response = r222 self.response.request = self223224225 @staticmethod226 def _encode_params(data):
95 unmodified lines
322 else:323 self._build_response(resp)324 self.response.ok = True325325 else:326327 self.sent = self.response.ok328329 return self.sent
28 unmodified lines
358 #: the history of the Request. Any redirect responses will end359 #: up here.360 self.history = []361362 self.request = None363364365 def __repr__(self):366 return '<Response [%s]>' % (self.status_code)367368
195 unmodified lines