Field

public struct Field

A header field in a HTTP request. A field consists of a key-value pair mapping name onto value.

Note

As HTTP headers are case insensitive, the implementations of Hashable and Equatable take this into consideration and convert all header names to lowercase before comparing them.
  • The name of a header field in a HTTP request.

    See more

    Declaration

    Swift

    public struct Name : Hashable, RawRepresentable, ExpressibleByStringLiteral, CustomStringConvertible
  • Undocumented

    Declaration

    Swift

    public let name: Name
  • Undocumented

    Declaration

    Swift

    public let value: String
  • Declaration

    Swift

    public var description: String { get }
  • Undocumented

    Declaration

    Swift

    public static func ~= (pattern: Field, value: Field) -> Bool
  • Undocumented

    Declaration

    Swift

    static let contentType: (MediaType) -> Field
  • Undocumented

    Declaration

    Swift

    static let accept: (MediaType) -> Field
  • Undocumented

    Declaration

    Swift

    static let acceptLanguage: (String) -> Field