typespec_client_core/http/headers/common.rs
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4use super::*;
5
6// HTTP headers are case-insensitive.
7// We use lowercase below for simple comparisons downstream.
8
9/// "accept" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1>.
10pub const ACCEPT: HeaderName = HeaderName::from_static_standard("accept");
11/// "accept-charset" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-12.5.2>.
12pub const ACCEPT_CHARSET: HeaderName = HeaderName::from_static_standard("accept-charset");
13/// "authorization" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-11.6.2>.
14pub const AUTHORIZATION: HeaderName = HeaderName::from_static_standard("authorization");
15/// "content-length" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-8.6>.
16pub const CONTENT_LENGTH: HeaderName = HeaderName::from_static_standard("content-length");
17/// "content-type" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-8.3>
18pub const CONTENT_TYPE: HeaderName = HeaderName::from_static_standard("content-type");
19/// "etag" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-11.7>.
20pub const ETAG: HeaderName = HeaderName::from_static_standard("etag");
21/// "if-match" HTTP header. See <https://www.rfc-editor.org/rfc/rfc7232#section-3.1>.
22pub const IF_MATCH: HeaderName = HeaderName::from_static_standard("if-match");
23/// "last-modified" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-13.1.1>.
24pub const LAST_MODIFIED: HeaderName = HeaderName::from_static_standard("last-modified");
25/// "prefer" HTTP header. See <https://www.rfc-editor.org/rfc/rfc7240>.
26pub const PREFER: HeaderName = HeaderName::from_static_standard("prefer");
27/// "retry-after" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-10.2.3>.
28pub const RETRY_AFTER: HeaderName = HeaderName::from_static_standard("retry-after");
29/// "user-agent" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-10.1.5>.
30pub const USER_AGENT: HeaderName = HeaderName::from_static_standard("user-agent");
31/// "www-authenticate" HTTP header. See <https://www.rfc-editor.org/rfc/rfc9110#section-11.6.1>.
32pub const WWW_AUTHENTICATE: HeaderName = HeaderName::from_static_standard("www-authenticate");