Req class

Req request object to handle incoming request.

Constructors

Req(String _localKey, HttpRequest _req)

Properties

app App?
Reference to the App instance that use request.
no setter
body ↔ dynamic
Contains data submitted in the request body.
getter/setter pair
certificate X509Certificate?
The client certificate of the client making the request.
no setter
contentLength int
The content length of the request body.
no setter
contentType ContentType?
Get Content Type of this request.
no setter
cookies List<Cookie>
The cookies in the request, from the "Cookie" headers.
no setter
files List<UploadedFile>
Holds the list of uploaded files from multipart request body
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers HttpHeaders
The request headers.
no setter
httpMethod Method
The HTTP method, as Method enum
no setter
isJson bool
no setter
isMultipart bool
no setter
isText bool
no setter
isUrlencoded bool
no setter
log Log
Logger attached to this request
getter/setter pair
method String
The method, such as 'GET' or 'POST', for the request.
no setter
mimeType String?
no setter
params Map<String, dynamic>
Get route params associated with this request.
getter/setter pair
path String
The URI path component
no setter
protocol String
Contains the request protocol string, either http or (for TLS requests) https
no setter
query Map<String, dynamic>
Contains the parsed query string from url.
no setter
request HttpRequest
Reference to raw HttpRequest object.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secure bool
true if a TLS connection is established
no setter
socket Future<WebSocket>
Upgrade this request into a web socket
no setter
uri Uri
The URI for the request.
no setter
uriString String
The URI String
no setter
xhr bool
Check if the request is an XMLHttpRequest
no setter

Methods

data(String key, [dynamic value]) → dynamic
Returns data from the body associated with the specified key.
get(String name) String?
hasData(String key) bool
Checks if the request body contains the specified key
logs() → void
logs the appropriate request messages
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
param(String key) → dynamic
q(String key) → dynamic
Returns query string value associated with the specified key.
session([String? name, dynamic value]) → dynamic
Get or set session
toString() String
A string representation of this object.
inherited

Operators

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