Request class
Request models the request object that Steward processes. It is a wrapper around the HttpRequest object but this may change in future iterations. Generally, you will not need to new up a request object on your own, but may find that useful when working with middleware and/or intercepting incoming requests.
Constructors
-
Request({required HttpRequest request, Map<
String, dynamic> pathParams = const {}})
Properties
- certificate → X509Certificate?
-
Gets the x509 certificate associated with this request
no setter
- container ↔ Container
-
getter/setter pair
-
Gets cookies associated with this request
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pathParams
↔ Map<
String, dynamic> -
getter/setter pair
- request ↔ HttpRequest
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → HttpSession
-
Gets the HTTPSession associated with this request
no setter
Methods
-
getBody(
) → Future< String> - Returns the body of this request as a Future
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setContainer(
Container? container) → void - Sets the container for this request This is useful for passing data between middleware and the controller but is also necessary as Steward expects the container to be present. If you new up a request manually, you will almost certainly want to set the container yourself.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited