MCPcopy
hub / github.com/encode/httpx / slow_response

Function slow_response

tests/conftest.py:101–110  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

99
100
101async def slow_response(scope: Scope, receive: Receive, send: Send) -> None:
102 await send(
103 {
104 "type": "http.response.start",
105 "status": 200,
106 "headers": [[b"content-type", b"text/plain"]],
107 }
108 )
109 await sleep(1.0) # Allow triggering a read timeout.
110 await send({"type": "http.response.body", "body": b"Hello, world!"})
111
112
113async def status_code(scope: Scope, receive: Receive, send: Send) -> None:

Callers 1

appFunction · 0.85

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected