Send Response
Sends a plain text response back to the client.
from abstra.hooks import send_response
send_response(body="plain text body")
Function definition
def send_response(body=None, status_code=200, headers=None, local_file=None) -> None:
Parameters
Keyword Arguments | Description |
---|---|
body (string) | Plain text response body |
status_code (number) | Http response status code |
headers (dict) | Headers to be sent back |
local_file (string) | Fallback file location for testing locally |
Returns
None