MCPcopy Create free account
hub / github.com/encode/starlette / get

Method get

tests/test_endpoints.py:17–21  ·  view source on GitHub ↗
(self, request: Request)

Source from the content-addressed store, hash-verified

15
16class Homepage(HTTPEndpoint):
17 async def get(self, request: Request) -> PlainTextResponse:
18 username = request.path_params.get("username")
19 if username is None:
20 return PlainTextResponse("Hello, world!")
21 return PlainTextResponse(f"Hello, {username}!")
22
23 async def query(self, request: Request) -> PlainTextResponse:
24 return PlainTextResponse("Hello, QUERY!")

Callers 15

test_request_urlFunction · 0.45
test_request_headersFunction · 0.45
test_request_bodyFunction · 0.45
test_request_streamFunction · 0.45
test_request_raw_pathFunction · 0.45
test_request_stateFunction · 0.45
appFunction · 0.45
test_request_cookiesFunction · 0.45
test_cookies_edge_casesFunction · 0.45
test_cookies_invalidFunction · 0.45

Calls 1

PlainTextResponseClass · 0.90

Tested by

no test coverage detected