Request class
Methods
all ()
→ Map <String , dynamic >
asDouble (String key )
→ double ?
asList (String key )
→ List
boolean (String key )
→ bool
cookie <T > (String key )
→ T?
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 ?
The upload under key, or the first of several. Null when key
holds no upload, a plain text field included.
files (String key )
→ List <RequestFile > ?
The uploads under key. Null when it holds none.
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