Dart Documentationclean_backendRequest

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) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Request(
   this.type,
   this.body,
   this.response,
   this.headers,
   this.httpRequest,
   this.match
);

Properties

String authenticatedUserId #

String authenticatedUserId

final body #

final dynamic body

final HttpHeaders headers #

final HttpHeaders headers

final HttpRequest httpRequest #

final HttpRequest httpRequest

final Map match #

Params returned from parsing of the path, i.e. /path/{param}/

final Map match

final Map<String, dynamic> meta #

final Map<String, dynamic> meta = {}

final HttpResponse response #

final HttpResponse response

final String type #

final String type

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(),
 });
}