http_constant/const/header_key.rs
1/// The HTTP header field name `server`.
2pub const SERVER: &str = "server";
3
4/// The HTTP header field name `accept`.
5pub const ACCEPT: &str = "accept";
6
7/// The HTTP header field name `accept-encoding`, used to specify acceptable content encodings.
8pub const ACCEPT_ENCODING: &str = "accept-encoding";
9
10/// The HTTP header field name `accept-language`, used to specify preferred languages for the response.
11pub const ACCEPT_LANGUAGE: &str = "accept-language";
12
13/// The HTTP header field name `authorization`, used to specify authentication credentials.
14pub const AUTHORIZATION: &str = "authorization";
15
16/// The HTTP header field name `cache-control`, used to specify caching directives.
17pub const CACHE_CONTROL: &str = "cache-control";
18
19/// The HTTP header field name `connection`, used to specify control options for the current connection.
20pub const CONNECTION: &str = "connection";
21
22/// The HTTP header field name `cookie`, used to send cookies from the server to the client.
23pub const COOKIE: &str = "cookie";
24
25/// The HTTP header field name `date`, used to specify the date and time at which the message was sent.
26pub const DATE: &str = "date";
27
28/// The HTTP header field name `etag`, used to specify a unique identifier for a resource version.
29pub const ETAG: &str = "etag";
30
31/// The HTTP header field name `host`, used to specify the host and port number of the server.
32pub const HOST: &str = "host";
33
34/// The HTTP header field name `last-modified`, used to specify the last modification date of the resource.
35pub const LAST_MODIFIED: &str = "last-modified";
36
37/// The HTTP header field name `location`, used to specify the url to redirect a client.
38pub const LOCATION: &str = "location";
39
40/// The HTTP header field name `referer`, used to specify the url of the referring resource.
41pub const REFERER: &str = "referer";
42
43/// The HTTP header field name `set-cookie`, used to send cookies from the server to the client.
44pub const SET_COOKIE: &str = "set-cookie";
45
46/// The HTTP header field name `transfer-encoding`, used to specify the form of encoding used to safely transfer the entity to the user.
47pub const TRANSFER_ENCODING: &str = "transfer-encoding";
48
49/// The HTTP header field name `upgrade`, used to indicate the protocol the client wants to upgrade to.
50pub const UPGRADE: &str = "upgrade";
51
52/// The HTTP header field name `sec-websocket-accept`.
53pub const SEC_WEB_SOCKET_ACCEPT: &str = "sec-websocket-accept";
54
55/// The HTTP header field name `sec-websocket-key`.
56pub const SEC_WEBSOCKET_KEY: &str = "sec-websocket-key";
57
58/// The HTTP header field name `vary`, used to specify that the response may vary based on certain request headers.
59pub const VARY: &str = "vary";
60
61/// The HTTP header field name `x-frame-options`, used to specify whether a browser should be allowed to render a page in a `<frame>`.
62pub const X_FRAME_OPTIONS: &str = "x-frame-options";
63
64/// The HTTP header field name `x-content-type-options`, used to indicate that the browser should not sniff the mime type of a response.
65pub const X_CONTENT_TYPE_OPTIONS: &str = "x-content-type-options";
66
67/// The HTTP header field name `x-powered-by`, used to indicate the technology used by the server.
68pub const X_POWERED_BY: &str = "x-powered-by";
69
70/// The HTTP header field name `x-requested-with`, used to identify the type of request, typically for ajax requests.
71pub const X_REQUESTED_WITH: &str = "x-requested-with";
72
73/// The HTTP header field name `content-length`.
74pub const CONTENT_LENGTH: &str = "content-length";
75
76/// The HTTP header field name `content-encoding`, used to specify the encoding transformations applied to the response body.
77pub const CONTENT_ENCODING: &str = "content-encoding";
78
79/// The HTTP header field name content-type, used to specify the media type of the resource or the data being sent in an http request or response.
80pub const CONTENT_TYPE: &str = "content-type";
81
82/// The HTTP header field `user-agent`.
83pub const USER_AGENT: &str = "user-agent";
84
85/// The HTTP header field `access-control-allow-origin`, used to specify which origins are allowed to access the resource.
86pub const ACCESS_CONTROL_ALLOW_ORIGIN: &str = "access-control-allow-origin";
87
88/// The HTTP header field `access-control-allow-methods`, used to specify The HTTP methods that are allowed when accessing the resource.
89pub const ACCESS_CONTROL_ALLOW_METHODS: &str = "access-control-allow-methods";
90
91/// The HTTP header field `access-control-allow-headers`, used to specify which http headers can be used during the request.
92pub const ACCESS_CONTROL_ALLOW_HEADERS: &str = "access-control-allow-headers";