Request class

The class Request is used to create a request object.

It is a wrapper around the ParsableRequest object.

Constructors

Request(IncomingMessage _original, [Map<String, dynamic> _routeParams = const {}])
The Request constructor is used to create a new instance of the Request class.

Properties

body Object?
The body of the request.
getter/setter pair
clientInfo HttpConnectionInfo?
The client of the request.
no setter
contentLength int
The content type of the request.
no setter
contentType ContentType
The content type of the request.
no setter
cookies List<Cookie>
The cookies of the request.
no setter
hashCode int
The hash code for this object.
no setterinherited
headers SerinusHeaders
The headers of the request.
no setter
host String
The host of the request.
no setter
hostname String
The hostname of the request.
no setter
id String
The id of the request.
no setter
method HttpMethod
The method of the request.
no setter
params Map<String, dynamic>
The params of the request.
getter/setter pair
path String
The path of the request.
no setter
query Map<String, dynamic>
The query parameters of the request.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session Session
The session of the request.
no setter
uri Uri
The uri of the request.
no setter

Methods

addData(String key, Object? value) → void
This method is used to add data to the request.
getData(String key) Object?
This method is used to get data from the request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(RequestEvent event, Future<void> listener(RequestEvent, EventData)) → void
This method is used to listen to a request event.
parseBody({bool rawBody = false, Future<void> onPart(MimeMultipart part)?}) Future<Object?>
This method is used to parse the body of the request.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String key) → dynamic
The operator [] is used to get data from the request.
operator []=(String key, dynamic value) → void
The operator []= is used to set data to the request.