Blocks until the request completes, and returns self.request.
(self, timeout=None)
| 163 | ) |
| 164 | |
| 165 | def wait_for_response(self, timeout=None): |
| 166 | """Blocks until the request completes, and returns self.request.""" |
| 167 | if self._worker_thread.is_alive(): |
| 168 | log.info("Waiting for response to {0} ...", self) |
| 169 | self._worker_thread.join(timeout) |
| 170 | |
| 171 | if self.exception is not None: |
| 172 | raise self.exception |
| 173 | return self.request |
| 174 | |
| 175 | def response_text(self): |
| 176 | """Blocks until the request completes, and returns the response body.""" |