MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / read_setup_payload

Function read_setup_payload

main.py:675–685  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

673
674
675async def read_setup_payload(request: Request) -> dict:
676 content_type = request.headers.get("content-type", "")
677 if "application/json" in content_type:
678 data = await request.json()
679 return data if isinstance(data, dict) else {}
680
681 body = (await request.body()).decode("utf-8")
682 return {
683 key: values if len(values) > 1 else values[-1]
684 for key, values in parse_qs(body).items()
685 }
686
687
688@asynccontextmanager

Callers 1

setup_submitFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected