Request class
class Request {
final String type;
final dynamic body;
final HttpResponse response;
final HttpHeaders headers;
final HttpRequest httpRequest;
/**
* Params returned from parsing of the path, i.e. /path/{param}/
*/
final Map match;
final Map<String, dynamic> meta = {};
String authenticatedUserId;
Request(
this.type,
this.body,
this.response,
this.headers,
this.httpRequest,
this.match
);
String toString(){
return JSON.encode({
'url' : httpRequest.uri.path,
'type' : type.toString(),
'body' : body.toString(),
'response' : response.toString(),
'headers' : headers.toString(),
'httpRequest' : httpRequest.toString(),
'match' : match.toString(),
});
}
}
Constructors
new Request(String type, body, HttpResponse response, HttpHeaders headers, HttpRequest httpRequest, Map match) #
Properties
final body #
final dynamic body
final HttpHeaders headers #
final HttpHeaders headers
final HttpRequest httpRequest #
final HttpRequest httpRequest
final HttpResponse response #
final HttpResponse response
Methods
String toString() #
Returns a string representation of this object.
docs inherited from Object
String toString(){
return JSON.encode({
'url' : httpRequest.uri.path,
'type' : type.toString(),
'body' : body.toString(),
'response' : response.toString(),
'headers' : headers.toString(),
'httpRequest' : httpRequest.toString(),
'match' : match.toString(),
});
}