Instance Subscriptswift-nio 2.72.0NIOHTTP1
subscript(_:)
HTTPTypes.swift:569subscript(position: HTTPHeaders.Index) -> Element { get }
Other members in extension
Types
Typealiases
Type members
init([(String, String)]
) Construct a
HTTPHeaders
structure.init(dictionaryLiteral: (String, String)...
) Construct a
HTTPHeaders
structure.static func == (lhs: HTTPHeaders, rhs: HTTPHeaders
) -> Bool
Instance members
var capacity: Int
The total number of headers that can be contained without allocating new storage.
var description: String
var endIndex: HTTPHeaders.Index
var startIndex: HTTPHeaders.Index
subscript(String
) -> [String] Retrieve all of the values for a give header field name from the block.
subscript(canonicalForm: String
) -> [Substring] Retrieves the header values for the given header field in “canonical form”: that is, splitting them on commas as extensively as possible such that multiple values received on the one line are returned as separate entries. Also respects the fact that Set-Cookie should not be split in this way.
func add(contentsOf: HTTPHeaders
) Add another block of headers to the block.
func add<S>(contentsOf: S
) Add a sequence of header name/value pairs to the block.
func add(name: String, value: String
) Add a header name/value pair to the block.
func contains(name: String
) -> Bool Checks if a header is present
func first(name: String
) -> String? Retrieves the first value for a given header field name from the block.
func index(after: HTTPHeaders.Index
) -> HTTPHeaders.Index func index(before: HTTPHeaders.Index
) -> HTTPHeaders.Index func remove(name: String
) Remove all values for a given header name from the block.
func replaceOrAdd(name: String, 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.
func reserveCapacity(Int
) Reserves enough space to store the specified number of headers.