Key
public struct Key : ExpressibleByStringLiteral, Equatable, Hashable, CustomStringConvertible
                A RequestHeaders.Key is a value type used to describe keys in a header dictionary.
You can create headers in a few ways:
- Using any type that conforms to 
RawRepresentablewhereRawValueisString - Using any type that conforms to 
CustomStringConvertible - Using strings or string literals
 
Commonly used values and additional factory methods are declared in an extension to reduce boilerplate and increase type safety.
- 
                  
                  
Create a
Keyfrom aCustomStringConvertibleDeclaration
Swift
public init<T>(_ value: T) where T : CustomStringConvertibleParameters
valueThe string convertible value
 - 
                  
                  
Create a
Keyfrom aRawRepresentableDeclaration
Swift
public init<T>(_ value: T) where T : RawRepresentable, T.RawValue == StringParameters
valueThe raw representable value
 - 
                  
                  
Create a
Keyfrom aStringDeclaration
Swift
public init(_ value: String)Parameters
valueThe string
 
- 
                  
                  
Declaration
Swift
public typealias StringLiteralType = String - 
                  
                  
Declaration
Swift
public init(stringLiteral value: StringLiteralType) 
- 
                  
                  
Declaration
Swift
public func hash(into hasher: inout Hasher) 
- 
                  
                  
Declaration
Swift
public static func == (lhs: Key, rhs: Key) -> Bool 
- 
                  
                  
Declaration
Swift
public let description: String 
- 
                  
                  
The
AcceptheaderDeclaration
Swift
static let acceptType: RequestHeaders.Key - 
                  
                  
The
Accept-EncodingheaderDeclaration
Swift
static let acceptEncoding: RequestHeaders.Key - 
                  
                  
The
Accept-LanguageheaderDeclaration
Swift
static let acceptLanguage: RequestHeaders.Key - 
                  
                  
The
AuthorizationheaderDeclaration
Swift
static let authorization: RequestHeaders.Key - 
                  
                  
The
Content-TypeheaderDeclaration
Swift
static let contentType: RequestHeaders.Key - 
                  
                  
The
Cache-ControlheaderDeclaration
Swift
static let cacheControl: RequestHeaders.Key - 
                  
                  
The
Content-DispositionheaderDeclaration
Swift
static let contentDisposition: RequestHeaders.Key - 
                  
                  
The
Content-LengthheaderDeclaration
Swift
static let contentLength: RequestHeaders.Key - 
                  
                  
The
HostheaderDeclaration
Swift
static let host: RequestHeaders.Key - 
                  
                  
The
LocationheaderDeclaration
Swift
static let location: RequestHeaders.Key - 
                  
                  
The
OriginheaderDeclaration
Swift
static let origin: RequestHeaders.Key - 
                  
                  
The
RefererheaderDeclaration
Swift
static let referer: RequestHeaders.Key - 
                  
                  
The
User-AgentheaderDeclaration
Swift
static let userAgent: RequestHeaders.Key 
View on GitHub
Install in Dash
        Key Structure Reference