HTTPRequestHeaderField

public enum HTTPRequestHeaderField: String

HTTP Header Fields for Client Requests

  • Content-Types that are acceptable for the response. See Content negotiation.

    Declaration

    Swift

    case accept = "Accept"
  • Character sets that are acceptable

    Declaration

    Swift

    case acceptCharset = "Accept-Charset"
  • Acceptable version in time

    Declaration

    Swift

    case acceptDatetime = "Accept-Datetime"
  • Authentication credentials for HTTP authentication

    Declaration

    Swift

    case authorization = "Authorization"
  • Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain

    Declaration

    Swift

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

    Declaration

    Swift

    case connection = "Connection"
  • An HTTP cookie previously sent by the server with Set-Cookie

    Declaration

    Swift

    case cookie = "Cookie"
  • The length of the request body in octets (8-bit bytes)

    Declaration

    Swift

    case contentLength = "Content-Length"
  • A Base64-encoded binary MD5 sum of the content of the request body

    Declaration

    Swift

    case contentMD5 = "Content-MD5"
  • The MIME type of the body of the request

    (used with POST and PUT requests)

    Declaration

    Swift

    case contentType = "Content-Type"
  • The date and time that the message was originated

    (in HTTP-date format as defined by RFC 7231 Date/Time Formats)

    Declaration

    Swift

    case date = "Date"
  • Indicates that particular server behaviors are required by the client

    Declaration

    Swift

    case expect = "Expect"
  • Disclose original information of a client connecting to a web server through an HTTP proxy

    Declaration

    Swift

    case forwarded = "Forwarded"
  • The email address of the user making the request

    Declaration

    Swift

    case from = "From"
  • The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening.

    The port number may be omitted if the port is the standard port for the service requested.

    Mandatory since HTTP/1.1.

    Declaration

    Swift

    case host = "Host"
  • Only perform the action if the client supplied entity matches the same entity on the server. This is mainly for methods like PUT to only update a resource if it has not been modified since the user last updated it.

    Declaration

    Swift

    case ifMatch = "If-Match"
  • Allows a 304 Not Modified to be returned if content is unchanged

    Declaration

    Swift

    case ifModifiedSince = "If-Modified-Since"
  • Allows a 304 Not Modified to be returned if content is unchanged, see HTTP ETag

    Declaration

    Swift

    case ifNoneMatch = "If-None-Match"
  • If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity

    Declaration

    Swift

    case ifRange = "If-Range"
  • Only send the response if the entity has not been modified since a specific time.

    Declaration

    Swift

    case ifUnmodifiedSince = "If-Unmodified-Since"
  • Limit the number of times the message can be forwarded through proxies or gateways.

    Declaration

    Swift

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

    Declaration

    Swift

    case pragma = "Pragma"
  • Authorization credentials for connecting to a proxy.

    Declaration

    Swift

    case proxyAuthorization = "Proxy-Authorization"
  • Request only part of an entity. Bytes are numbered from 0. See Byte serving.

    Declaration

    Swift

    case range = "Range"
  • This is the address of the previous web page from which a link to the currently requested page was followed.

    (The word “referrer” has been misspelled in the RFC as well as in most implementations to the point that it has become standard usage and is considered correct terminology)

    Declaration

    Swift

    case referer = "Referer"
  • The transfer encodings the user agent is willing to accept: the same values as for the response header field Transfer-Encoding can be used, plus the trailers value (related to the chunked transfer method) to notify the server it expects to receive additional fields in the trailer after the last, zero-sized, chunk.

    Declaration

    Swift

    case transferEncoding = "TE"
  • The user agent string of the user agent

    Declaration

    Swift

    case userAgent = "User-Agent"
  • Ask the server to upgrade to another protocol.

    Declaration

    Swift

    case upgrade = "Upgrade"
  • via

    Informs the server of proxies through which the request was sent.

    Declaration

    Swift

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

    Declaration

    Swift

    case warning = "Warning"
  • Mainly used to identify Ajax requests. Most JavaScript frameworks send this field with value of XMLHttpRequest

    Declaration

    Swift

    case x_RequestedWith = "X-Requested-With"
  • Requests a web application to disable their tracking of a user.

    Declaration

    Swift

    case doNotTrack = "DNT"
  • A de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer

    Declaration

    Swift

    case x_ForwardedFor = "X-Forwarded-For"
  • a de facto standard for identifying the original host requested by the client in the Host HTTP request header, since the host name and/or port of the reverse proxy (load balancer) may differ from the origin server handling the request.

    Declaration

    Swift

    case x_ForwardedHost = "X-Forwarded-Host"
  • a de facto standard for identifying the originating protocol of an HTTP request, since a reverse proxy (or a load balancer) may communicate with a web server using HTTP even if the request to the reverse proxy is HTTPS. An alternative form of the header (X-ProxyUser-Ip) is used by Google clients talking to Google servers.

    Declaration

    Swift

    case x_ForwardedProto = "X-Forwarded-Proto"
  • Non-standard header field used by Microsoft applications and load-balancers

    Declaration

    Swift

    case frontEndHttps = "Front-End-Https"
  • Requests a web application override the method specified in the request (typically POST) with the method given in the header field (typically PUT or DELETE). Can be used when a user agent or firewall prevents PUT or DELETE methods from being sent directly

    (note that this either a bug in the software component, which ought to be fixed, or an intentional configuration, in which case bypassing it may be the wrong thing to do).

    Declaration

    Swift

    case x_HTTPMethodOverride = "X-HTTP-Method-Override"
  • Allows easier parsing of the MakeModel/Firmware that is usually found in the User-Agent String of AT&T Devices

    Declaration

    Swift

    case x_AttDeviceid = "X-Att-Deviceid"
  • Links to an XML file on the Internet with a full description and details about the device currently connecting.

    Declaration

    Swift

    case x_WapProfile = "x-wap-profile"
  • Implemented as a misunderstanding of the HTTP specifications. Common because of mistakes in implementations of early HTTP versions. Has exactly the same functionality as standard Connection field.

    Declaration

    Swift

    case proxyConnection = "Proxy-Connection"
  • Server-side deep packet insertion of a unique ID identifying customers of Verizon Wireless; also known as perma-cookie or supercookie

    Declaration

    Swift

    case x_UIDH = "X-UIDH"
  • Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKEN

    Declaration

    Swift

    case x_CsrfToken = "X-Csrf-Token"