HTTPResponseHeaderField

public enum HTTPResponseHeaderField: String

HTTP Header fields for Server Responses

  • Specifying which web sites can participate in cross-origin resource sharing

    Declaration

    Swift

    case accessControlAllowOrigin = "Access-Control-Allow-Origin"
  • Specifies which patch document formats this server supports

    Declaration

    Swift

    case acceptPatch = "Accept-Patch"
  • What partial content range types this server supports via byte serving

    Declaration

    Swift

    case acceptRanges = "Accept-Ranges"
  • age

    The age the object has been in a proxy cache in seconds

    Declaration

    Swift

    case age = "Age"
  • Valid actions for a specified resource. To be used for a 405 Method not allowed

    Declaration

    Swift

    case allow = "Allow"
  • A server uses Alt-Svc header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol

    Declaration

    Swift

    case altSvc = "Alt-Svc"
  • Tells all caching mechanisms from server to client whether they may cache this object.

    It is measured in seconds

    Declaration

    Swift

    case cacheControl = "Cache-Control"
  • Control options for the current connection and list of hop-by-hop response fields

    Declaration

    Swift

    case connection = "Connection"
  • An opportunity to raise a File Download dialogue box for a known MIME type with binary format or suggest a filename for dynamic content.

    Declaration

    Swift

    case contentDisposition = "Content-Disposition"
  • The natural language or languages of the intended audience for the enclosed content

    Declaration

    Swift

    case contentLanguage = "Content-Language"
  • The length of the response body in octets (8-bit bytes)

    Declaration

    Swift

    case contentLength = "Content-Length"
  • An alternate location for the returned data

    Declaration

    Swift

    case contentLocation = "Content-Location"
  • A Base64-encoded binary MD5 sum of the content of the response

    Declaration

    Swift

    case contentMD5 = "Content-MD5"
  • Where in a full body message this partial message belongs

    Declaration

    Swift

    case contentRange = "Content-Range"
  • The MIME type of this content

    Declaration

    Swift

    case contentType = "Content-Type"
  • The date and time that the message was sent (in HTTP-date format as defined by RFC 7231)

    Declaration

    Swift

    case date = "Date"
  • An identifier for a specific version of a resource, often a message digest

    Declaration

    Swift

    case eTag = "ETag"
  • Gives the date/time after which the response is considered stale (in HTTP-date format as defined by RFC 7231)

    Declaration

    Swift

    case expires = "Expires"
  • The last modified date for the requested object (in HTTP-date format as defined by RFC 7231)

    Declaration

    Swift

    case lastModified = "Last-Modified"
  • Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988

    Declaration

    Swift

    case link = "Link"
  • Used in redirection, or when a new resource has been created.

    Declaration

    Swift

    case location = "Location"
  • p3p

    This field is supposed to set P3P policy, in the form of P3P:CP=your_compact_policy.

    Declaration

    Swift

    case p3p = "P3P"
  • Implementation-specific fields that may have various effects anywhere along the request-response chain.

    Declaration

    Swift

    case pragma = "Pragma"
  • Request authentication to access the proxy.

    Declaration

    Swift

    case proxyAuthenticate = "Proxy-Authenticate"
  • HTTP Public Key Pinning, announces hash of website’s authentic TLS certificate

    Declaration

    Swift

    case publicKeyPins = "Public-Key-Pins"
  • Used in redirection, or when a new resource has been created.

    Declaration

    Swift

    case refresh = "Refresh"
  • If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.

    Declaration

    Swift

    case retryAfter = "Retry-After"
  • A name for the server

    Declaration

    Swift

    case server = "Server"
  • An HTTP cookie

    Declaration

    Swift

    case setCookie = "Set-Cookie"
  • CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate Status-Line instead, defined by RFC 7230.

    Declaration

    Swift

    case status = "Status"
  • A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.

    Declaration

    Swift

    case strictTransportSecurity = "Strict-Transport-Security"
  • The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.

    Declaration

    Swift

    case trailer = "Trailer"
  • The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.

    Declaration

    Swift

    case transferEncoding = "Transfer-Encoding"
  • tsv

    Tracking Status Value, value suggested to be sent in response to a DNT(do-not-track)

    Declaration

    Swift

    case tsv = "TSV"
  • Ask the client to upgrade to another protocol.

    Declaration

    Swift

    case upgrade = "Upgrade"
  • Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.

    Declaration

    Swift

    case vary = "Vary"
  • via

    Informs the client of proxies through which the response was sent.

    Declaration

    Swift

    case via = "Via"
  • A general warning about possible problems with the entity body.

    Declaration

    Swift

    case warning = "Warning"
  • Indicates the authentication scheme that should be used to access the requested entity.

    Declaration

    Swift

    case wwwAuthenticate = "WWW-Authenticate"
  • Clickjacking protection

    Declaration

    Swift

    case x_FrameOptions = "X-Frame-Options"
  • Cross-site scripting (XSS) filter

    Declaration

    Swift

    case x_XSSProtection = "X-XSS-Protection"
  • Content Security Policy definition.

    Declaration

    Swift

    case x_WebKitCSP = "X-WebKit-CSP"
  • The only defined value, nosniff, prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.

    Declaration

    Swift

    case x_ContentTypeOptions = "X-Content-Type-Options"
  • Specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application

    Declaration

    Swift

    case x_PoweredBy = "X-Powered-By"
  • Recommends the preferred rendering engine (often a backward-compatibility mode) to use to display the content.

    Also used to activate Chrome Frame in Internet Explorer.

    Declaration

    Swift

    case x_UACompatible = "X-UA-Compatible"
  • Provide the duration of the audio or video in seconds;

    only supported by Gecko browsers

    Declaration

    Swift

    case x_ContentDuration = "X-Content-Duration"
  • Tells a server which (presumably in the middle of a HTTP -> HTTPS migration) hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requests

    Declaration

    Swift

    case upgradeInsecureRequests = "Upgrade-Insecure-Requests"
  • Correlates HTTP requests between a client and server.

    Declaration

    Swift

    case x_RequestID = "X-Request-ID"