ClientRequest class final

An outgoing request, as sent (and as recorded by HttpFake).

Constructors

ClientRequest(String method, Uri url, Headers headers, String body)
A request of method to url, as a fake sees it.

Properties

body → String
The body as text.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Headers
The request headers.
final
isJson → bool
Whether the body is JSON.
no setter
method → String
The HTTP method, upper case.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → Uri
The full URL.
final

Methods

data() → Map<String, Object?>
The decoded JSON or form body as a map (empty when there is none).
The first value of the header name, or null.
json([String? key]) → Object?
A value of the body by dot path (customer.email).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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