Request class
A request that was received from the client.
Clients may not extend, implement or mix-in this class.
Constructors
Properties
- clientRequestTime → int?
-
The time (milliseconds since epoch) at which the client made the request
or
null
if this information is not provided by the client.final - hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The unique identifier used to identify this request.
final
- method → String
-
The method being requested.
final
-
params
→ Map<
String, Object?> -
A table mapping the names of request parameters to their values.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Return a table representing the structure of the Json object that will be sent to the client to represent this response.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Map< String, Object?> result) → Request? -
Return a request parsed from the given json, or
null
if thedata
is not a valid json representation of a request. Thedata
is expected to have the following format: -
fromString(
String data) → Request? -
Return a request parsed from the given
data
, ornull
if thedata
is not a valid json representation of a request. Thedata
is expected to have the following format:
Constants
- CLIENT_REQUEST_TIME → const String
- The name of the optional JSON attribute indicating the time (milliseconds since epoch) at which the client made the request.
- ID → const String
- The name of the JSON attribute containing the id of the request.
- METHOD → const String
- The name of the JSON attribute containing the name of the request.
- PARAMS → const String
- The name of the JSON attribute containing the request parameters.