Request class abstract

All requests from client or in-server triggered with Request

All Requests generate a Request regardless of the agent. It should not be perceived as requests only from the client. All triggers, cron jobs and internal requests are Request. So all request have create Cause.

These created requests are made by any ways. So, the Agent of all these requests is also necessary. There are all possible agent and cause in enum are Agent and Cause.

Agent and Cause stored RequestContext

And defined agent and cause getters in Request

Inheritance
Implementers

Constructors

Request({required RequestContext context, ContentType? contentType, Body? body, Map<String, List<String>>? headers, List<Cookie>? cookies, Methods? method})
Creates with subclasses
Request.fromMap(Map<String, dynamic> map, HttpRequest base, RequestContext context)
factory
Request.fromRequest(Request request)

Properties

agent Agent
Request agent. Example: The agent of all http/(s) requests received by the server is Agent.http
no setterinherited
arguments Map<String, dynamic>
no setter
auth AccessToken?
no setterinherited
body Body?
Request Body Http requests body or web socket messages "body" values In Cron Jobs body is empty
getter/setter pairinherited
cause Cause
Request Cause. Indicates why this request is made.
no setterinherited
contentType ContentType?
getter/setter pairinherited
context RequestContext
RequestContext is context of request info about handling, creating, responding
finalinherited
cookies List<Cookie>?
final
fullPath String
Request Full Path include host and scheme and query parameters examples : http request : https://localhost:9090/a/b?c=d web socket req. : ws://a/b?c=d internal req. : style://a/b?c=d
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, List<String>>?
final
method Methods?
getter/setter pair
nextPathSegment String
no setterinherited
path PathController
no setterinherited
responded bool?
if sending operation not resulted sent is null if success, sent is true if operation failed, sent is false
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token AccessToken?
getter/setter pair

Methods

ensureResponded() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
response(Body? body, {int? statusCode, Map<String, dynamic>? headers, ContentType? contentType}) Response
toMap() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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