Executes a request, returning an `HTTPResponse`. The request may be either a string URL or an `HTTPRequest` object. If it is a string, we construct an `HTTPRequest` using any additional kwargs: ``HTTPRequest(request, **kwargs)`` If an error occurs during the fetch,
(
self, request: Union["HTTPRequest", str], **kwargs: Any
)
| 120 | self._closed = True |
| 121 | |
| 122 | def fetch( |
| 123 | self, request: Union["HTTPRequest", str], **kwargs: Any |
| 124 | ) -> "HTTPResponse": |
| 125 | """Executes a request, returning an `HTTPResponse`. |
| 126 | |
| 127 | The request may be either a string URL or an `HTTPRequest` object. |
| 128 | If it is a string, we construct an `HTTPRequest` using any additional |
| 129 | kwargs: ``HTTPRequest(request, **kwargs)`` |
| 130 | |
| 131 | If an error occurs during the fetch, we raise an `HTTPError` unless |
| 132 | the ``raise_error`` keyword argument is set to False. |
| 133 | """ |
| 134 | response = self._io_loop.run_sync( |
| 135 | functools.partial(self._async_client.fetch, request, **kwargs) |
| 136 | ) |
| 137 | return response |
| 138 | |
| 139 | |
| 140 | class AsyncHTTPClient(Configurable): |
no test coverage detected