Request class

Constructors

Request.from({required HttpRequest request, RouteData? route})

Properties

body Map<String, dynamic>
getter/setter pair
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?
no setter
method String?
no setter
path String?
no setter
request HttpRequest
final
response HttpResponse
no setter
route → RouteData?
final
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
Gets a cookie by name and casts it to type T.
date(String key) DateTime?
except(dynamic key) Map<String, dynamic>
extractBody() Future<Request>
file(String key) RequestFile?
files(String key) List<RequestFile>?
has(dynamic keys) bool
hasAny(List<String> keys) bool
hasFile(String key) bool
input([String? key, dynamic defaultVal]) → dynamic
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