MCPcopy Create free account
hub / github.com/pallets/quart / __init__

Method __init__

src/quart/wrappers/base.py:34–73  ·  view source on GitHub ↗

Create a request or websocket base object. Arguments: method: The HTTP verb. scheme: The scheme used for the request. path: The full unquoted path of the request. query_string: The raw bytes for the query string part. headers: The

(
        self,
        method: str,
        scheme: str,
        path: str,
        query_string: bytes,
        headers: Headers,
        root_path: str,
        http_version: str,
        scope: WWWScope,
    )

Source from the content-addressed store, hash-verified

32 view_args: dict[str, Any] | None = None
33
34 def __init__(
35 self,
36 method: str,
37 scheme: str,
38 path: str,
39 query_string: bytes,
40 headers: Headers,
41 root_path: str,
42 http_version: str,
43 scope: WWWScope,
44 ) -> None:
45 """Create a request or websocket base object.
46
47 Arguments:
48 method: The HTTP verb.
49 scheme: The scheme used for the request.
50 path: The full unquoted path of the request.
51 query_string: The raw bytes for the query string part.
52 headers: The request headers.
53 root_path: The root path that should be prepended to all
54 routes.
55 http_version: The HTTP version of the request.
56 scope: Underlying ASGI scope dictionary.
57
58 Attributes:
59 args: The query string arguments.
60 scheme: The URL scheme, http or https.
61 """
62 super().__init__(
63 method,
64 scheme,
65 scope.get("server"),
66 root_path,
67 path,
68 query_string,
69 headers,
70 headers.get("Remote-Addr"),
71 )
72 self.http_version = http_version
73 self.scope = scope
74
75 @property
76 def endpoint(self) -> str | None:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected