header

Sets an HTTP header for the outgoing request.

All fields are lowercased before storing for consistency - there are also some commonly used header constants available at Headers.

Parameters

field

The header field to set, e.g. "Content-Encoding"

value

The value to set for the given field

See also