mirror of
https://github.com/apple/swift-http-types
synced 2026-11-29 05:14:22 +00:00
Add inlinables (#149)
### Motivation We want to have fast code. ### Changes Add `@inlinable` to a number of functions, to allow better compiler optimizations. ### Result Improvements in some benchmarks
This commit is contained in:
1 parent
f41c097554
commit
6aff14dae9
6 files changed
+312
-81
No files matched your search
@@ -41,6 +41,7 @@ extension HTTPField {
|
||||
///
|
||||
/// - Parameter name: The name of the HTTP field. It can be accessed from the `rawName`
|
||||
/// property.
|
||||
@inlinable
|
||||
public init?(_ name: String) {
|
||||
guard let canonicalName = HTTPField.validatedCanonicalName(name) else {
|
||||
return nil
|
||||
@@ -73,11 +74,13 @@ extension HTTPField {
|
||||
self.canonicalName = name
|
||||
}
|
||||
|
||||
private init(rawName: String, canonicalName: String) {
|
||||
@inlinable
|
||||
init(rawName: String, canonicalName: String) {
|
||||
self.rawName = rawName
|
||||
self.canonicalName = canonicalName
|
||||
}
|
||||
|
||||
@inlinable
|
||||
var isPseudo: Bool {
|
||||
self.rawName.utf8.first == UInt8(ascii: ":")
|
||||
}
|
||||
@@ -147,36 +150,41 @@ extension HTTPField.Name: Codable {
|
||||
|
||||
@available(HTTPTypes 1.0, *)
|
||||
extension HTTPField.Name {
|
||||
static var method: Self { .init(rawName: ":method", canonicalName: ":method") }
|
||||
static var scheme: Self { .init(rawName: ":scheme", canonicalName: ":scheme") }
|
||||
static var authority: Self { .init(rawName: ":authority", canonicalName: ":authority") }
|
||||
static var path: Self { .init(rawName: ":path", canonicalName: ":path") }
|
||||
static var `protocol`: Self { .init(rawName: ":protocol", canonicalName: ":protocol") }
|
||||
static var status: Self { .init(rawName: ":status", canonicalName: ":status") }
|
||||
@inlinable static var method: Self { .init(rawName: ":method", canonicalName: ":method") }
|
||||
@inlinable static var scheme: Self { .init(rawName: ":scheme", canonicalName: ":scheme") }
|
||||
@inlinable static var authority: Self { .init(rawName: ":authority", canonicalName: ":authority") }
|
||||
@inlinable static var path: Self { .init(rawName: ":path", canonicalName: ":path") }
|
||||
@inlinable static var `protocol`: Self { .init(rawName: ":protocol", canonicalName: ":protocol") }
|
||||
@inlinable static var status: Self { .init(rawName: ":status", canonicalName: ":status") }
|
||||
|
||||
/// Accept
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var accept: Self { .init(rawName: "Accept", canonicalName: "accept") }
|
||||
|
||||
/// Accept-Encoding
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var acceptEncoding: Self { .init(rawName: "Accept-Encoding", canonicalName: "accept-encoding") }
|
||||
|
||||
/// Accept-Language
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var acceptLanguage: Self { .init(rawName: "Accept-Language", canonicalName: "accept-language") }
|
||||
|
||||
/// Accept-Ranges
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var acceptRanges: Self { .init(rawName: "Accept-Ranges", canonicalName: "accept-ranges") }
|
||||
|
||||
/// Access-Control-Allow-Credentials
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlAllowCredentials: Self {
|
||||
.init(rawName: "Access-Control-Allow-Credentials", canonicalName: "access-control-allow-credentials")
|
||||
}
|
||||
@@ -184,6 +192,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Allow-Headers
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlAllowHeaders: Self {
|
||||
.init(rawName: "Access-Control-Allow-Headers", canonicalName: "access-control-allow-headers")
|
||||
}
|
||||
@@ -191,6 +200,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Allow-Methods
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlAllowMethods: Self {
|
||||
.init(rawName: "Access-Control-Allow-Methods", canonicalName: "access-control-allow-methods")
|
||||
}
|
||||
@@ -198,6 +208,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Allow-Origin
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlAllowOrigin: Self {
|
||||
.init(rawName: "Access-Control-Allow-Origin", canonicalName: "access-control-allow-origin")
|
||||
}
|
||||
@@ -205,6 +216,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Expose-Headers
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlExposeHeaders: Self {
|
||||
.init(rawName: "Access-Control-Expose-Headers", canonicalName: "access-control-expose-headers")
|
||||
}
|
||||
@@ -212,6 +224,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Max-Age
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlMaxAge: Self {
|
||||
.init(rawName: "Access-Control-Max-Age", canonicalName: "access-control-max-age")
|
||||
}
|
||||
@@ -219,6 +232,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Request-Headers
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlRequestHeaders: Self {
|
||||
.init(rawName: "Access-Control-Request-Headers", canonicalName: "access-control-request-headers")
|
||||
}
|
||||
@@ -226,6 +240,7 @@ extension HTTPField.Name {
|
||||
/// Access-Control-Request-Method
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var accessControlRequestMethod: Self {
|
||||
.init(rawName: "Access-Control-Request-Method", canonicalName: "access-control-request-method")
|
||||
}
|
||||
@@ -233,16 +248,19 @@ extension HTTPField.Name {
|
||||
/// Age
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9111.html
|
||||
@inlinable
|
||||
public static var age: Self { .init(rawName: "Age", canonicalName: "age") }
|
||||
|
||||
/// Allow
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var allow: Self { .init(rawName: "Allow", canonicalName: "allow") }
|
||||
|
||||
/// Authentication-Info
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var authenticationInfo: Self {
|
||||
.init(rawName: "Authentication-Info", canonicalName: "authentication-info")
|
||||
}
|
||||
@@ -250,12 +268,14 @@ extension HTTPField.Name {
|
||||
/// Authorization
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var authorization: Self { .init(rawName: "Authorization", canonicalName: "authorization") }
|
||||
|
||||
/// Available-Dictionary
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9842.html
|
||||
@available(HTTPTypes 1.6, *)
|
||||
@inlinable
|
||||
public static var availableDictionary: Self {
|
||||
.init(rawName: "Available-Dictionary", canonicalName: "available-dictionary")
|
||||
}
|
||||
@@ -263,16 +283,19 @@ extension HTTPField.Name {
|
||||
/// Cache-Control
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9111.html
|
||||
@inlinable
|
||||
public static var cacheControl: Self { .init(rawName: "Cache-Control", canonicalName: "cache-control") }
|
||||
|
||||
/// Connection
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var connection: Self { .init(rawName: "Connection", canonicalName: "connection") }
|
||||
|
||||
/// Content-Disposition
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6266.html
|
||||
@inlinable
|
||||
public static var contentDisposition: Self {
|
||||
.init(rawName: "Content-Disposition", canonicalName: "content-disposition")
|
||||
}
|
||||
@@ -280,31 +303,37 @@ extension HTTPField.Name {
|
||||
/// Content-Encoding
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentEncoding: Self { .init(rawName: "Content-Encoding", canonicalName: "content-encoding") }
|
||||
|
||||
/// Content-Language
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentLanguage: Self { .init(rawName: "Content-Language", canonicalName: "content-language") }
|
||||
|
||||
/// Content-Length
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentLength: Self { .init(rawName: "Content-Length", canonicalName: "content-length") }
|
||||
|
||||
/// Content-Location
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentLocation: Self { .init(rawName: "Content-Location", canonicalName: "content-location") }
|
||||
|
||||
/// Content-Range
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentRange: Self { .init(rawName: "Content-Range", canonicalName: "content-range") }
|
||||
|
||||
/// Content-Security-Policy
|
||||
///
|
||||
/// https://www.w3.org/TR/CSP/
|
||||
@inlinable
|
||||
public static var contentSecurityPolicy: Self {
|
||||
.init(rawName: "Content-Security-Policy", canonicalName: "content-security-policy")
|
||||
}
|
||||
@@ -312,6 +341,7 @@ extension HTTPField.Name {
|
||||
/// Content-Security-Policy-Report-Only
|
||||
///
|
||||
/// https://www.w3.org/TR/CSP/
|
||||
@inlinable
|
||||
public static var contentSecurityPolicyReportOnly: Self {
|
||||
.init(rawName: "Content-Security-Policy-Report-Only", canonicalName: "content-security-policy-report-only")
|
||||
}
|
||||
@@ -319,16 +349,19 @@ extension HTTPField.Name {
|
||||
/// Content-Type
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var contentType: Self { .init(rawName: "Content-Type", canonicalName: "content-type") }
|
||||
|
||||
/// Cookie
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6265.html
|
||||
@inlinable
|
||||
public static var cookie: Self { .init(rawName: "Cookie", canonicalName: "cookie") }
|
||||
|
||||
/// Cross-Origin-Resource-Policy
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var crossOriginResourcePolicy: Self {
|
||||
.init(rawName: "Cross-Origin-Resource-Policy", canonicalName: "cross-origin-resource-policy")
|
||||
}
|
||||
@@ -336,68 +369,81 @@ extension HTTPField.Name {
|
||||
/// Date
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var date: Self { .init(rawName: "Date", canonicalName: "date") }
|
||||
|
||||
/// Dictionary-ID
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9842.html
|
||||
@available(HTTPTypes 1.6, *)
|
||||
@inlinable
|
||||
public static var dictionaryID: Self { .init(rawName: "Dictionary-ID", canonicalName: "dictionary-id") }
|
||||
|
||||
/// Early-Data
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc8470.html
|
||||
@inlinable
|
||||
public static var earlyData: Self { .init(rawName: "Early-Data", canonicalName: "early-data") }
|
||||
|
||||
/// ETag
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var eTag: Self { .init(rawName: "ETag", canonicalName: "etag") }
|
||||
|
||||
/// Expect
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var expect: Self { .init(rawName: "Expect", canonicalName: "expect") }
|
||||
|
||||
/// Expires
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9111.html
|
||||
@inlinable
|
||||
public static var expires: Self { .init(rawName: "Expires", canonicalName: "expires") }
|
||||
|
||||
/// From
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var from: Self { .init(rawName: "From", canonicalName: "from") }
|
||||
|
||||
/// Host
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@available(*, unavailable, message: "Use HTTPRequest.authority instead")
|
||||
@inlinable
|
||||
public static var host: Self { .init(rawName: "Host", canonicalName: "host") }
|
||||
|
||||
/// If-Match
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var ifMatch: Self { .init(rawName: "If-Match", canonicalName: "if-match") }
|
||||
|
||||
/// If-Modified-Since
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var ifModifiedSince: Self { .init(rawName: "If-Modified-Since", canonicalName: "if-modified-since") }
|
||||
|
||||
/// If-None-Match
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var ifNoneMatch: Self { .init(rawName: "If-None-Match", canonicalName: "if-none-match") }
|
||||
|
||||
/// If-Range
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var ifRange: Self { .init(rawName: "If-Range", canonicalName: "if-range") }
|
||||
|
||||
/// If-Unmodified-Since
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var ifUnmodifiedSince: Self {
|
||||
.init(rawName: "If-Unmodified-Since", canonicalName: "if-unmodified-since")
|
||||
}
|
||||
@@ -405,31 +451,37 @@ extension HTTPField.Name {
|
||||
/// Last-Modified
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var lastModified: Self { .init(rawName: "Last-Modified", canonicalName: "last-modified") }
|
||||
|
||||
/// Location
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var location: Self { .init(rawName: "Location", canonicalName: "location") }
|
||||
|
||||
/// Max-Forwards
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var maxForwards: Self { .init(rawName: "Max-Forwards", canonicalName: "max-forwards") }
|
||||
|
||||
/// Origin
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6454.html
|
||||
@inlinable
|
||||
public static var origin: Self { .init(rawName: "Origin", canonicalName: "origin") }
|
||||
|
||||
/// Priority
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9218.html
|
||||
@inlinable
|
||||
public static var priority: Self { .init(rawName: "Priority", canonicalName: "priority") }
|
||||
|
||||
/// Proxy-Authenticate
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var proxyAuthenticate: Self {
|
||||
.init(rawName: "Proxy-Authenticate", canonicalName: "proxy-authenticate")
|
||||
}
|
||||
@@ -437,6 +489,7 @@ extension HTTPField.Name {
|
||||
/// Proxy-Authentication-Info
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var proxyAuthenticationInfo: Self {
|
||||
.init(rawName: "Proxy-Authentication-Info", canonicalName: "proxy-authentication-info")
|
||||
}
|
||||
@@ -444,6 +497,7 @@ extension HTTPField.Name {
|
||||
/// Proxy-Authorization
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var proxyAuthorization: Self {
|
||||
.init(rawName: "Proxy-Authorization", canonicalName: "proxy-authorization")
|
||||
}
|
||||
@@ -452,31 +506,37 @@ extension HTTPField.Name {
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9209.html
|
||||
@available(HTTPTypes 1.3, *)
|
||||
@inlinable
|
||||
public static var proxyStatus: Self { .init(rawName: "Proxy-Status", canonicalName: "proxy-status") }
|
||||
|
||||
/// Range
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var range: Self { .init(rawName: "Range", canonicalName: "range") }
|
||||
|
||||
/// Referer
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var referer: Self { .init(rawName: "Referer", canonicalName: "referer") }
|
||||
|
||||
/// Retry-After
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var retryAfter: Self { .init(rawName: "Retry-After", canonicalName: "retry-after") }
|
||||
|
||||
/// Sec-Purpose
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var secPurpose: Self { .init(rawName: "Sec-Purpose", canonicalName: "sec-purpose") }
|
||||
|
||||
/// Sec-WebSocket-Accept
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6455.html
|
||||
@inlinable
|
||||
public static var secWebSocketAccept: Self {
|
||||
.init(rawName: "Sec-WebSocket-Accept", canonicalName: "sec-websocket-accept")
|
||||
}
|
||||
@@ -484,6 +544,7 @@ extension HTTPField.Name {
|
||||
/// Sec-WebSocket-Extensions
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6455.html
|
||||
@inlinable
|
||||
public static var secWebSocketExtensions: Self {
|
||||
.init(rawName: "Sec-WebSocket-Extensions", canonicalName: "sec-websocket-extensions")
|
||||
}
|
||||
@@ -491,11 +552,13 @@ extension HTTPField.Name {
|
||||
/// Sec-WebSocket-Key
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6455.html
|
||||
@inlinable
|
||||
public static var secWebSocketKey: Self { .init(rawName: "Sec-WebSocket-Key", canonicalName: "sec-websocket-key") }
|
||||
|
||||
/// Sec-WebSocket-Protocol
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6455.html
|
||||
@inlinable
|
||||
public static var secWebSocketProtocol: Self {
|
||||
.init(rawName: "Sec-WebSocket-Protocol", canonicalName: "sec-websocket-protocol")
|
||||
}
|
||||
@@ -503,6 +566,7 @@ extension HTTPField.Name {
|
||||
/// Sec-WebSocket-Version
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6455.html
|
||||
@inlinable
|
||||
public static var secWebSocketVersion: Self {
|
||||
.init(rawName: "Sec-WebSocket-Version", canonicalName: "sec-websocket-version")
|
||||
}
|
||||
@@ -510,16 +574,19 @@ extension HTTPField.Name {
|
||||
/// Server
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var server: Self { .init(rawName: "Server", canonicalName: "server") }
|
||||
|
||||
/// Set-Cookie
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6265.html
|
||||
@inlinable
|
||||
public static var setCookie: Self { .init(rawName: "Set-Cookie", canonicalName: "set-cookie") }
|
||||
|
||||
/// Strict-Transport-Security
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc6797.html
|
||||
@inlinable
|
||||
public static var strictTransportSecurity: Self {
|
||||
.init(rawName: "Strict-Transport-Security", canonicalName: "strict-transport-security")
|
||||
}
|
||||
@@ -527,64 +594,76 @@ extension HTTPField.Name {
|
||||
/// TE
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var te: Self { .init(rawName: "TE", canonicalName: "te") }
|
||||
|
||||
/// Traceparent
|
||||
///
|
||||
/// https://www.w3.org/TR/trace-context/
|
||||
@available(HTTPTypes 1.6, *)
|
||||
@inlinable
|
||||
public static var traceparent: Self { .init(rawName: "Traceparent", canonicalName: "traceparent") }
|
||||
|
||||
/// Tracestate
|
||||
///
|
||||
/// https://www.w3.org/TR/trace-context/
|
||||
@available(HTTPTypes 1.6, *)
|
||||
@inlinable
|
||||
public static var tracestate: Self { .init(rawName: "Tracestate", canonicalName: "tracestate") }
|
||||
|
||||
/// Trailer
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var trailer: Self { .init(rawName: "Trailer", canonicalName: "trailer") }
|
||||
|
||||
/// Transfer-Encoding
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9112.html
|
||||
@inlinable
|
||||
public static var transferEncoding: Self { .init(rawName: "Transfer-Encoding", canonicalName: "transfer-encoding") }
|
||||
|
||||
/// Upgrade
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var upgrade: Self { .init(rawName: "Upgrade", canonicalName: "upgrade") }
|
||||
|
||||
/// Use-As-Dictionary
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9842.html
|
||||
@available(HTTPTypes 1.6, *)
|
||||
@inlinable
|
||||
public static var useAsDictionary: Self { .init(rawName: "Use-As-Dictionary", canonicalName: "use-as-dictionary") }
|
||||
|
||||
/// User-Agent
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var userAgent: Self { .init(rawName: "User-Agent", canonicalName: "user-agent") }
|
||||
|
||||
/// Vary
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var vary: Self { .init(rawName: "Vary", canonicalName: "vary") }
|
||||
|
||||
/// Via
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var via: Self { .init(rawName: "Via", canonicalName: "via") }
|
||||
|
||||
/// WWW-Authenticate
|
||||
///
|
||||
/// https://www.rfc-editor.org/rfc/rfc9110.html
|
||||
@inlinable
|
||||
public static var wwwAuthenticate: Self { .init(rawName: "WWW-Authenticate", canonicalName: "www-authenticate") }
|
||||
|
||||
/// X-Content-Type-Options
|
||||
///
|
||||
/// https://fetch.spec.whatwg.org/
|
||||
@inlinable
|
||||
public static var xContentTypeOptions: Self {
|
||||
.init(rawName: "X-Content-Type-Options", canonicalName: "x-content-type-options")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user