The base class for HTTP responses.

Subclasses of BaseResponse are usually not constructed manually; instead, they're returned by send or other HTTP client methods.

Implemented by

Constructors

BaseResponse(int statusCode, { int contentLength, BaseRequest request, Map<String, String> headers: const {}, bool isRedirect: false, bool persistentConnection: true, String reasonPhrase })

Creates a new HTTP response.

Properties

contentLength → int

The size of the response body, in bytes.

read-only
headers → Map<String, String>

The headers for this response.

read-only
isRedirect → bool

Whether this response is a redirect.

read-only
persistentConnection → bool

Whether the server requested that a persistent connection be maintained.

read-only
reasonPhrase → String

The reason phrase associated with the status code.

read-only
request → BaseRequest

The (frozen) request that triggered this response.

read-only
statusCode → int

The status code of the response.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited