DoxRequest class

Constructors

DoxRequest(HttpRequest httpRequest)

Properties

body Map<String, dynamic>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
Get all headers value
no setter
httpRequest HttpRequest
final
method String
getter/setter pair
param Map<String, dynamic>
getter/setter pair
query Map<String, dynamic>
getter/setter pair
response HttpResponse
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
no setter

Methods

add(String key, dynamic value) → void
Add new request value
all() Map<String, dynamic>
Get all request from body and query
auth<T>() → T?
get cookie value from header
has(String key) bool
Check if input is present
Get header value
host() String
get host|domain
input(String key) → dynamic
Get request value
ip() String
Get user IP
isFormData() bool
http request data is form data
isJson() bool
http request data is json
mapInputs(Map<String, String> mapper) → void
map request input keys
merge(Map<String, dynamic> values) → void
Merge request values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
only(List<String> keys) Map<String, dynamic>
Get Only specific request from body and query
origin() String?
get origin
referer() String?
get referer
toJson() Map<String, dynamic>
support jsonEncode to convert json
toString() String
A string representation of this object.
inherited
userAgent() String
get user agent from header
validate(Map<String, String> rules, {Map<String, String> messages = const <String, String>{}}) → void
validate input request

Operators

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

Static Methods

httpRequestToDoxRequest(HttpRequest request, RouteData route) Future<DoxRequest>
we are not using constructor here because we need to call async to read body data