Structurevapor 4.106.2Vapor->NIOHTTP1
Link
HTTPHeaders+Link.swift:22struct Link
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (38) members.
Types
struct CacheControl
Represents the HTTP
Cache-Control
header.struct Connection
struct ContentDisposition
struct ContentRange
Represents the HTTP
Content-Range
response header.struct Expires
struct Forwarded
Parses the
Forwarded
header.struct LastModified
Represents the HTTP
Last-Modified
header.struct Name
Type used for the name of a HTTP header in the
HTTPHeaders
storage.struct Range
Represents the HTTP
Range
request header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Rangeenum RangeUnit
The unit in which
ContentRange
s andRange
s are specified. This is usuallybytes
. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Rangestruct ResponseCompression
A marker header internal to vapor that explicitely allows or disallows response compression.
Type members
Instance members
var accept: [HTTPMediaTypePreference]
Returns a collection of
MediaTypePreference
s specified by this HTTP message’s"Accept"
header.var basicAuthorization: BasicAuthorization?
Access or set the
Authorization: Basic: ...
header.var bearerAuthorization: BearerAuthorization?
Access or set the
Authorization: Bearer: ...
header.var cacheControl: CacheControl?
Gets the value of the
Cache-Control
header, if present.var connection: Connection?
var contentDisposition: ContentDisposition?
Convenience for accessing the Content-Disposition header.
var contentRange: ContentRange?
Convenience for accessing the Content-Range response header.
var contentType: HTTPMediaType?
MediaType
specified by this message’s"Content-Type"
header.var debugDescription: String
See
CustomDebugStringConvertible.debugDescription
var expires: Expires?
Gets the value of the
Expires
header, if present.var forwarded: [Forwarded]
Convenience for accessing the Forwarded header. This header is added by proxies to pass information about the original request.
var lastModified: LastModified?
var links: [Link]?
Convenience for accessing the Link header as an array of provided links.
var range: Range?
Convenience for accessing the
Range
request header.var responseCompression: ResponseCompression
A marker header internal to vapor that explicitely allows or disallows response compression.
var setCookie: HTTPCookies?
Get and set
HTTPCookies
for an HTTP response This accesses the"Set-Cookie"
header.subscript(Name
) -> [String] Retrieve all of the values for a given header field name from the block.
subscript(canonicalForm: Name
) -> [Substring] func add(name: Name, value: String
) Add a header name/value pair to the block.
func contains(name: Name
) -> Bool Returns
true
if theHTTPHeaders
contains a value for the supplied name.func encode(to: any Encoder
) throws func expirationDate(requestSentAt: Date
) -> Date? Determines when the cached data should be expired.
func first(name: Name
) -> String? Returns the first header value with the supplied name.
func remove(name: Name
) Remove all values for a given header name from the block.
func replaceOrAdd(name: Name, value: String
) Add a header name/value pair to the block, replacing any previous values for the same header name that are already in the block.
Citizens in Vapor
Types
struct Relation
See https://www.iana.org/assignments/link-relations/link-relations.xhtml