Return an HttpResponse object for the given HttpRequest.
(self, request)
| 136 | return method |
| 137 | |
| 138 | def get_response(self, request): |
| 139 | """Return an HttpResponse object for the given HttpRequest.""" |
| 140 | # Setup default url resolver for this thread |
| 141 | set_urlconf(settings.ROOT_URLCONF) |
| 142 | response = self._middleware_chain(request) |
| 143 | response._resource_closers.append(request.close) |
| 144 | if response.status_code >= 400: |
| 145 | log_response( |
| 146 | "%s: %s", |
| 147 | response.reason_phrase, |
| 148 | request.path, |
| 149 | response=response, |
| 150 | request=request, |
| 151 | ) |
| 152 | return response |
| 153 | |
| 154 | async def get_response_async(self, request): |
| 155 | """ |
no test coverage detected