Functions
_body_allowed
1
bool
▼
Whether an HTTP status code permits a response body.
_body_allowed
1
bool
▼
def _body_allowed(status: int) -> bool
Parameters
| Name | Type | Description |
|---|---|---|
status |
int |
Returns
bool
send_response
2
None
▼
Translate a chirp Response into ASGI send() calls.
async
send_response
2
None
▼
async def send_response(response: Response, send: Send) -> None
Parameters
| Name | Type | Description |
|---|---|---|
response |
Response |
|
send |
Send |
send_streaming_response
3
None
▼
Send a streaming response via chunked transfer encoding.
Sends headers immedia…
async
send_streaming_response
3
None
▼
async def send_streaming_response(response: StreamingResponse, send: Send, *, debug: bool = False) -> None
Send a streaming response via chunked transfer encoding.
Sends headers immediately, then each chunk as an ASGI body
message withmore_body=True. Closes with an empty body.
On mid-stream error, emits an HTML comment and closes.
Parameters
| Name | Type | Description |
|---|---|---|
response |
StreamingResponse |
|
send |
Send |
|
debug |
bool |
Default:False
|