HttpResp class

A minimal HTTP response, decoupled from any client library.

Constructors

HttpResp(int statusCode, String body, {Map<String, String> headers = const {}})
const

Properties

body String
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Lower-cased response header names mapped to their values.
final
ok bool
Whether the status is 2xx.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
final

Methods

json() Map<String, dynamic>
Parses the body as a JSON object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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