Skip to content

AsgiResponse

faststream.asgi.AsgiResponse #

AsgiResponse(body, status_code, headers=None)
Source code in faststream/asgi/response.py
def __init__(
    self,
    body: bytes,
    status_code: int,
    headers: Optional[Mapping[str, str]] = None,
) -> None:
    self.status_code = status_code
    self.body = body
    self.raw_headers = _get_response_headers(body, headers, status_code)

status_code instance-attribute #

status_code = status_code

body instance-attribute #

body = body

raw_headers instance-attribute #

raw_headers = _get_response_headers(body, headers, status_code)