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

Function status_code

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

Source from the content-addressed store, hash-verified

111
112
113async def status_code(scope: Scope, receive: Receive, send: Send) -> None:
114 status_code = int(scope["path"].replace("/status/", ""))
115 await send(
116 {
117 "type": "http.response.start",
118 "status": status_code,
119 "headers": [[b"content-type", b"text/plain"]],
120 }
121 )
122 await send({"type": "http.response.body", "body": b"Hello, world!"})
123
124
125async def echo_body(scope: Scope, receive: Receive, send: Send) -> None:

Callers 1

appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected