MCPcopy Index your code
hub / github.com/encode/httpx / echo_raw_path

Function echo_raw_path

tests/test_asgi.py:26–32  ·  view source on GitHub ↗
(scope, receive, send)

Source from the content-addressed store, hash-verified

24
25
26async def echo_raw_path(scope, receive, send):
27 status = 200
28 output = json.dumps({"raw_path": scope["raw_path"].decode("ascii")}).encode("utf-8")
29 headers = [(b"content-type", "text/plain"), (b"content-length", str(len(output)))]
30
31 await send({"type": "http.response.start", "status": status, "headers": headers})
32 await send({"type": "http.response.body", "body": output})
33
34
35async def echo_body(scope, receive, send):

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected