Instance Subscriptvapor 4.114.1Vapor->NIOHTTP1

subscript(_:)

Retrieve all of the values for a given header field name from the block.

HTTPHeaders+Name.swift:479
subscript(name: Name) -> [String] { get }

Parameters

name

The header field name whose values are to be retrieved.

Returns

A list of the values for that header field name.

This method uses case-insensitive comparisons for the header field name. It does not return a maximally-decomposed list of the header fields, but instead returns them in their original representation: that means that a comma-separated header field list may contain more than one entry, some of which contain commas and some do not. If you want a representation of the header fields suitable for performing computation on, consider getCanonicalForm.