HttpHeaders class abstract

Headers for HTTP requests.

In some situations, headers are immutable: HttpClientRequest have immutable headers from the moment the body is written to. In this situation, the mutating methods throw exceptions.

For all operations on HTTP headers the header name is case-insensitive.

To set the value of a header use the set() method:

request.headers.set('Content-Type',
                   'application/json');

Constructors

HttpHeaders()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(String name, Object value) → void
Sets the header name to value.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited