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

Method __init__

starlette/middleware/base.py:205–218  ·  view source on GitHub ↗
(
        self,
        content: AsyncContentStream,
        status_code: int = 200,
        headers: Mapping[str, str] | None = None,
        media_type: str | None = None,
        info: Mapping[str, Any] | None = None,
    )

Source from the content-addressed store, hash-verified

203
204class _StreamingResponse(Response):
205 def __init__(
206 self,
207 content: AsyncContentStream,
208 status_code: int = 200,
209 headers: Mapping[str, str] | None = None,
210 media_type: str | None = None,
211 info: Mapping[str, Any] | None = None,
212 ) -> None:
213 self.info = info
214 self.body_iterator = content
215 self.status_code = status_code
216 self.media_type = media_type
217 self.init_headers(headers)
218 self.background = None
219
220 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
221 if self.info is not None:

Callers

nothing calls this directly

Calls 1

init_headersMethod · 0.80

Tested by

no test coverage detected