add(name:value:)

Add a header name/value pair to the block.

HTTPTypes.swift:363
mutating func add(name: String, value: String)

Parameters

name

The header field name. For maximum compatibility this should be an ASCII string. For future-proofing with HTTP/2 lowercase header names are strongly recommended.

value

The header field value to add for the given name.

This method is strictly additive: if there are other values for the given header name already in the block, this will add a new entry.