Skip to main content

send_response

Send an HTTP response.

Parameters

NameDescriptionTypeDefault
bodyResponse body content. Non-string values will be serialized to JSON. Defaults to empty string.Union[str, Dict, List]''
status_codeHTTP status code. Defaults to 200.int200
headersHTTP response headers. Defaults to empty dict. BadSendResponse: If status_code is not an integer or headers is not a dictionary.Dict[str, str]{}

Return Value

None