Request class

A single HTTP request.

Instances of this class travel through a RequestController chain to be responded to, sometimes acquiring new values as they go through controllers. Each instance of this class has a standard library HttpRequest. You should not respond directly to the HttpRequest, as RequestControllers take that responsibility.



Request(HttpRequest innerRequest)
Creates an instance of Request, no need to do so manually.


acceptableContentTypes List<ContentType>
The acceptable content types for a Response returned for this instance. [...]
attachments Map
Container for any data a RequestController wants to attach to this request for the purpose of being used by a later RequestController. [...]
read / write
authorization Authorization
Authorization information associated with this request. [...]
read / write
body HTTPRequestBody
The request body object. [...]
connectionInfo HttpConnectionInfo
Information about the client connection. [...]
innerRequest HttpRequest
The internal HttpRequest of this Request. [...]
isCORSRequest bool
Whether or not this request is a CORS request. [...]
isPreflightRequest bool
Whether or not this is a CORS preflight request. [...]
path HTTPRequestPath
The path and any extracted variable parameters from the URI of this request. [...]
read / write
receivedDate DateTime
The timestamp for when this request was received.
read / write
respondDate DateTime
The timestamp for when this request was responded to. [...]
read / write
response HttpResponse
The response object of this Request. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


acceptsContentType(ContentType contentType) bool
Whether a Response may contain a body of type contentType. [...]
addResponseModifier(void modifier(Response response)) → void
Allows a RequestController to modify the response eventually created for this request, without creating that response itself. [...]
respond(Response aqueductResponse) Future
Sends a Response to this Request's client. [...]
toDebugString({bool includeElapsedTime: true, bool includeRequestIP: false, bool includeMethod: true, bool includeResource: true, bool includeStatusCode: true, bool includeContentSize: false, bool includeHeaders: false }) String
A string that represents more details about the request, typically used for logging. [...]
toString() String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]


operator ==(dynamic other) bool
The equality operator. [...]