MCPcopy
hub / github.com/encode/starlette / file_response

Method file_response

starlette/staticfiles.py:175–187  ·  view source on GitHub ↗
(
        self,
        full_path: PathLike,
        stat_result: os.stat_result,
        scope: Scope,
        status_code: int = 200,
    )

Source from the content-addressed store, hash-verified

173 return "", None
174
175 def file_response(
176 self,
177 full_path: PathLike,
178 stat_result: os.stat_result,
179 scope: Scope,
180 status_code: int = 200,
181 ) -> Response:
182 request_headers = Headers(scope=scope)
183
184 response = FileResponse(full_path, status_code=status_code, stat_result=stat_result)
185 if self.is_not_modified(response.headers, request_headers):
186 return NotModifiedResponse(response.headers)
187 return response
188
189 async def check_config(self) -> None:
190 """

Callers 1

get_responseMethod · 0.95

Calls 4

is_not_modifiedMethod · 0.95
HeadersClass · 0.90
FileResponseClass · 0.90
NotModifiedResponseClass · 0.85

Tested by

no test coverage detected