aio-libs / aiohttp
1
"""HTTP Headers constants."""
2

3
# After changing the file content call ./tools/gen.py
4
# to regenerate the headers parser
5 10
from typing import Set
6

7 10
from multidict import istr
8 10
from typing_extensions import Final
9

10 10
METH_ANY: Final[str] = "*"
11 10
METH_CONNECT: Final[str] = "CONNECT"
12 10
METH_HEAD: Final[str] = "HEAD"
13 10
METH_GET: Final[str] = "GET"
14 10
METH_DELETE: Final[str] = "DELETE"
15 10
METH_OPTIONS: Final[str] = "OPTIONS"
16 10
METH_PATCH: Final[str] = "PATCH"
17 10
METH_POST: Final[str] = "POST"
18 10
METH_PUT: Final[str] = "PUT"
19 10
METH_TRACE: Final[str] = "TRACE"
20

21 10
METH_ALL: Final[Set[str]] = {
22
    METH_CONNECT,
23
    METH_HEAD,
24
    METH_GET,
25
    METH_DELETE,
26
    METH_OPTIONS,
27
    METH_PATCH,
28
    METH_POST,
29
    METH_PUT,
30
    METH_TRACE,
31
}
32

33 10
ACCEPT: Final[istr] = istr("Accept")
34 10
ACCEPT_CHARSET: Final[istr] = istr("Accept-Charset")
35 10
ACCEPT_ENCODING: Final[istr] = istr("Accept-Encoding")
36 10
ACCEPT_LANGUAGE: Final[istr] = istr("Accept-Language")
37 10
ACCEPT_RANGES: Final[istr] = istr("Accept-Ranges")
38 10
ACCESS_CONTROL_MAX_AGE: Final[istr] = istr("Access-Control-Max-Age")
39 10
ACCESS_CONTROL_ALLOW_CREDENTIALS: Final[istr] = istr("Access-Control-Allow-Credentials")
40 10
ACCESS_CONTROL_ALLOW_HEADERS: Final[istr] = istr("Access-Control-Allow-Headers")
41 10
ACCESS_CONTROL_ALLOW_METHODS: Final[istr] = istr("Access-Control-Allow-Methods")
42 10
ACCESS_CONTROL_ALLOW_ORIGIN: Final[istr] = istr("Access-Control-Allow-Origin")
43 10
ACCESS_CONTROL_EXPOSE_HEADERS: Final[istr] = istr("Access-Control-Expose-Headers")
44 10
ACCESS_CONTROL_REQUEST_HEADERS: Final[istr] = istr("Access-Control-Request-Headers")
45 10
ACCESS_CONTROL_REQUEST_METHOD: Final[istr] = istr("Access-Control-Request-Method")
46 10
AGE: Final[istr] = istr("Age")
47 10
ALLOW: Final[istr] = istr("Allow")
48 10
AUTHORIZATION: Final[istr] = istr("Authorization")
49 10
CACHE_CONTROL: Final[istr] = istr("Cache-Control")
50 10
CONNECTION: Final[istr] = istr("Connection")
51 10
CONTENT_DISPOSITION: Final[istr] = istr("Content-Disposition")
52 10
CONTENT_ENCODING: Final[istr] = istr("Content-Encoding")
53 10
CONTENT_LANGUAGE: Final[istr] = istr("Content-Language")
54 10
CONTENT_LENGTH: Final[istr] = istr("Content-Length")
55 10
CONTENT_LOCATION: Final[istr] = istr("Content-Location")
56 10
CONTENT_MD5: Final[istr] = istr("Content-MD5")
57 10
CONTENT_RANGE: Final[istr] = istr("Content-Range")
58 10
CONTENT_TRANSFER_ENCODING: Final[istr] = istr("Content-Transfer-Encoding")
59 10
CONTENT_TYPE: Final[istr] = istr("Content-Type")
60 10
COOKIE: Final[istr] = istr("Cookie")
61 10
DATE: Final[istr] = istr("Date")
62 10
DESTINATION: Final[istr] = istr("Destination")
63 10
DIGEST: Final[istr] = istr("Digest")
64 10
ETAG: Final[istr] = istr("Etag")
65 10
EXPECT: Final[istr] = istr("Expect")
66 10
EXPIRES: Final[istr] = istr("Expires")
67 10
FORWARDED: Final[istr] = istr("Forwarded")
68 10
FROM: Final[istr] = istr("From")
69 10
HOST: Final[istr] = istr("Host")
70 10
IF_MATCH: Final[istr] = istr("If-Match")
71 10
IF_MODIFIED_SINCE: Final[istr] = istr("If-Modified-Since")
72 10
IF_NONE_MATCH: Final[istr] = istr("If-None-Match")
73 10
IF_RANGE: Final[istr] = istr("If-Range")
74 10
IF_UNMODIFIED_SINCE: Final[istr] = istr("If-Unmodified-Since")
75 10
KEEP_ALIVE: Final[istr] = istr("Keep-Alive")
76 10
LAST_EVENT_ID: Final[istr] = istr("Last-Event-ID")
77 10
LAST_MODIFIED: Final[istr] = istr("Last-Modified")
78 10
LINK: Final[istr] = istr("Link")
79 10
LOCATION: Final[istr] = istr("Location")
80 10
MAX_FORWARDS: Final[istr] = istr("Max-Forwards")
81 10
ORIGIN: Final[istr] = istr("Origin")
82 10
PRAGMA: Final[istr] = istr("Pragma")
83 10
PROXY_AUTHENTICATE: Final[istr] = istr("Proxy-Authenticate")
84 10
PROXY_AUTHORIZATION: Final[istr] = istr("Proxy-Authorization")
85 10
RANGE: Final[istr] = istr("Range")
86 10
REFERER: Final[istr] = istr("Referer")
87 10
RETRY_AFTER: Final[istr] = istr("Retry-After")
88 10
SEC_WEBSOCKET_ACCEPT: Final[istr] = istr("Sec-WebSocket-Accept")
89 10
SEC_WEBSOCKET_VERSION: Final[istr] = istr("Sec-WebSocket-Version")
90 10
SEC_WEBSOCKET_PROTOCOL: Final[istr] = istr("Sec-WebSocket-Protocol")
91 10
SEC_WEBSOCKET_EXTENSIONS: Final[istr] = istr("Sec-WebSocket-Extensions")
92 10
SEC_WEBSOCKET_KEY: Final[istr] = istr("Sec-WebSocket-Key")
93 10
SEC_WEBSOCKET_KEY1: Final[istr] = istr("Sec-WebSocket-Key1")
94 10
SERVER: Final[istr] = istr("Server")
95 10
SET_COOKIE: Final[istr] = istr("Set-Cookie")
96 10
TE: Final[istr] = istr("TE")
97 10
TRAILER: Final[istr] = istr("Trailer")
98 10
TRANSFER_ENCODING: Final[istr] = istr("Transfer-Encoding")
99 10
UPGRADE: Final[istr] = istr("Upgrade")
100 10
URI: Final[istr] = istr("URI")
101 10
USER_AGENT: Final[istr] = istr("User-Agent")
102 10
VARY: Final[istr] = istr("Vary")
103 10
VIA: Final[istr] = istr("Via")
104 10
WANT_DIGEST: Final[istr] = istr("Want-Digest")
105 10
WARNING: Final[istr] = istr("Warning")
106 10
WWW_AUTHENTICATE: Final[istr] = istr("WWW-Authenticate")
107 10
X_FORWARDED_FOR: Final[istr] = istr("X-Forwarded-For")
108 10
X_FORWARDED_HOST: Final[istr] = istr("X-Forwarded-Host")
109 10
X_FORWARDED_PROTO: Final[istr] = istr("X-Forwarded-Proto")

Read our documentation on viewing source code .

Loading