Extended Structure
HTTPHeaders
extension HTTPHeaders
Topics
Structures
HTTPHeaders.CacheControlRepresents the HTTPCache-Controlheader.HTTPHeaders.ConnectionHTTPHeaders.ContentDispositionHTTPHeaders.ContentRangeRepresents the HTTPContent-Rangeresponse header.HTTPHeaders.ExpiresHTTPHeaders.ForwardedParses theForwardedheader.HTTPHeaders.LastModifiedRepresents the HTTPLast-Modifiedheader.HTTPHeaders.LinkHTTPHeaders.NameType used for the name of a HTTP header in theHTTPHeadersstorage.HTTPHeaders.RangeRepresents the HTTPRangerequest header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/RangeHTTPHeaders.ResponseCompressionA marker header internal to vapor that explicitly allows or disallows response compression.
Instance Properties
acceptReturns a collection ofMediaTypePreferences specified by this HTTP message’s"Accept"header.basicAuthorizationAccess or set theAuthorization: Basic: ...header.bearerAuthorizationAccess or set theAuthorization: Bearer: ...header.cacheControlGets the value of theCache-Controlheader, if present.connectioncontentDispositionConvenience for accessing the Content-Disposition header.contentRangeConvenience for accessing the Content-Range response header.contentTypeMediaTypespecified by this message’s"Content-Type"header.cookieGet and setHTTPCookiesfor an HTTP request This accesses the"Cookie"header.expiresGets the value of theExpiresheader, if present.forwardedConvenience for accessing the Forwarded header. This header is added by proxies to pass information about the original request.lastModifiedlinksConvenience for accessing the Link header as an array of provided links.rangeConvenience for accessing theRangerequest header.responseCompressionA marker header internal to vapor that explicitly allows or disallows response compression.setCookieGet and setHTTPCookiesfor an HTTP response This accesses the"Set-Cookie"header.
Instance Methods
add(name:value:)Add a header name/value pair to the block.contains(name:)Returnstrueif theHTTPHeaderscontains a value for the supplied name.expirationDate(requestSentAt:)Determines when the cached data should be expired.first(name:)Returns the first header value with the supplied name.remove(name:)Remove all values for a given header name from the block.replaceOrAdd(name:value:)Add a header name/value pair to the block, replacing any previous values for the same header name that are already in the block.
Subscripts
subscript(_:)Retrieve all of the values for a given header field name from the block.subscript(canonicalForm:)
Enumerations
HTTPHeaders.RangeUnitThe unit in whichContentRanges andRanges are specified. This is usuallybytes. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range
Default Implementations
Relationships
Conforms To
Swift.CopyableSwift.CustomDebugStringConvertibleSwift.DecodableSwift.EncodableSwift.Escapable