FakeRequest class final

One REST request as a handler sees it, after routing, token and proof checks.

Constructors

FakeRequest({required String operationId, required String method, required Uri uri, required Map<String, String> pathParams, required Map<String, String> headers, required Object? body, required FakeWorld world, required Uri baseUri, FakeSession? session, String? proofJkt, Uint8List? bytes})
Creates the request.

Properties

baseUri → Uri
The address of the fake (http://127.0.0.1:<port>).
final
body → Object?
The decoded JSON body, or null.
final
bytes → Uint8List?
The raw body of an application/octet-stream request (uploadPart), or null.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
The headers, names in lower case.
final
json → JsonMap
The body as a JSON object (empty without a body).
no setter
method → String
The HTTP method in upper case.
final
operationId → String
The operationId of the route.
final
pathParams → Map<String, String>
The path parameters by name (thread_id, ...), decoded.
final
person → FakePerson
The person of session; throws a StateError for an unsecured operation.
no setter
proofJkt → String?
The thumbprint of the DPoP proof's key, when the request carried a valid proof.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
session → FakeSession?
The session of the access token of a secured operation.
final
uri → Uri
The request URI as received.
final
world → FakeWorld
The world.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
param(String name) → String
The path parameter name; throws when the route has none.
query(String name) → String?
The query parameter name, or null.
toString() → String
A string representation of this object.
inherited

Operators

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