MCPcopy Create free account
hub / github.com/apify/crawlee-python / send_html_response

Function send_html_response

tests/unit/server.py:83–92  ·  view source on GitHub ↗

Send an HTML response to the client.

(send: Send, html_content: bytes, status: int = 200)

Source from the content-addressed store, hash-verified

81
82
83async def send_html_response(send: Send, html_content: bytes, status: int = 200) -> None:
84 """Send an HTML response to the client."""
85 await send(
86 {
87 'type': 'http.response.start',
88 'status': status,
89 'headers': [[b'content-type', b'text/html; charset=utf-8']],
90 }
91 )
92 await send({'type': 'http.response.body', 'body': html_content})
93
94
95async def app(scope: dict[str, Any], receive: Receive, send: Send) -> None:

Callers 14

hello_worldFunction · 0.85
hello_world_xmlFunction · 0.85
start_enqueue_endpointFunction · 0.85
secondary_index_endpointFunction · 0.85
incapsula_endpointFunction · 0.85
non_href_links_endpointFunction · 0.85
robots_txtFunction · 0.85
slow_responseFunction · 0.85
infinite_scroll_endpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected