Request class

Constructors

Request()

Properties

body ↔ Map<String, dynamic>
getter/setter pair
clientIp → String?
The originating client address.
no setter
contentType → ContentType?
no setter
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, dynamic>
no setter
host → String
no setter
ip → String?
The address of the socket this request arrived on.
no setter
method → String?
no setter
path → String?
no setter
request ↔ HttpRequest
getter/setter pair
response → HttpResponse
no setter
route ↔ RouteData?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uri → Uri
no setter
url → String
no setter
user → Map?
no setter

Methods

all() → Map<String, dynamic>
asDouble(String key) → double?
asList(String key) → List
boolean(String key) → bool
date(String key) → DateTime?
except(dynamic key) → Map<String, dynamic>
extractBody() → Future<Request>
Extracts the request body (form-data / json / urlencoded) into body and prepares the merged view of body+query+params.
file(String key) → RequestFile?
files(String key) → List<RequestFile>?
from({required HttpRequest request, RouteData? route}) → Request
has(dynamic keys) → bool
hasAny(List<String> keys) → bool
hasFile(String key) → bool
input([String? key, dynamic defaultVal]) → dynamic
Returns the input value for key as-is (no implicit int coercion).
integer(String key) → int?
isFormData() → bool
isJson() → bool
isMethod(String method) → bool
isUrlencoded() → bool
json(String key) → Map
merge(Map<String, dynamic> values) → void
mergeIfMissing(Map<String, dynamic> values) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
only(List<String> keys) → Map<String, dynamic>
origin() → String?
params() → Map<String, dynamic>
query([String? key, String? defaultVal]) → dynamic
referer() → String?
setCustomRule(List<CustomValidationRule> customRule) → Request
string(String key) → String
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited
userAgent() → String?
validate(dynamic rules, [Map<String, String> messages = const <String, String>{}]) → Future<void>
whenHas(String key) → Future

Operators

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