Request class

This message defines attributes for an HTTP request.

If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.

Constructors

Request({Auth? auth, Map<String, String>? headers, String? host, String? id, String? method, String? path, String? protocol, String? query, String? reason, String? scheme, String? size, String? time})
Request.fromJson(Map json_)

Properties

auth Auth?
The request authentication.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
The HTTP request headers.
getter/setter pair
host String?
The HTTP request Host header value.
getter/setter pair
id String?
The unique ID for a request, which can be propagated to downstream systems.
getter/setter pair
method String?
The HTTP request method, such as GET, POST.
getter/setter pair
path String?
The HTTP URL path, excluding the query parameters.
getter/setter pair
protocol String?
The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".
getter/setter pair
query String?
The HTTP URL query in the format of name1=value1&name2=value2, as it appears in the first line of the HTTP request.
getter/setter pair
reason String?
A special parameter for request reason.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme String?
The HTTP URL scheme, such as http and https.
getter/setter pair
size String?
The HTTP request size in bytes.
getter/setter pair
time String?
The timestamp when the destination service receives the last byte of the request.
getter/setter pair

Methods

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

Operators

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