RequestContext<RawRequest> class

A convenience wrapper around an incoming RawRequest.

Implementers

Constructors

RequestContext()

Properties

acceptsAll → bool
Returns as true if the client's Accept header indicates that it will accept any response content type.
read-only
app Angel
The Angel instance that is responding to this request.
read / write
body → Stream<List<int>>
The Stream of incoming binary data sent from the client.
read-only
bodyAsList ↔ List
Returns a mutable List parsed from the request body. [...]
read / write
bodyAsMap ↔ Map<String, dynamic>
Returns a mutable Map of the fields parsed from the request body. [...]
read / write
bodyAsObject ↔ Object
Returns the parsed request body, whatever it may be (typically a Map or List). [...]
read / write
container Container
The IoC container that can be used to provide functionality to produce objects of a given type. [...]
read-only
contentType MediaType
The content type of an incoming request.
read-only
cookies → List<Cookie>
Any cookies sent with this request.
read-only
extension → String
Returns the file extension of the requested path, if any. [...]
read-only
hasParsedBody → bool
Returns true if parseBody has been called so far.
read-only
headers → HttpHeaders
All HTTP headers sent with this request.
read-only
hostname → String
The requested hostname.
read-only
ip → String
The user's IP.
read-only
isXhr → bool
Is this an XMLHttpRequest?
read-only
method → String
This request's HTTP method. [...]
read-only
originalMethod → String
The original HTTP verb sent to the server.
read-only
params ↔ Map<String, dynamic>
The URL parameters extracted from the request URI.
read / write
path → String
The requested path.
read-only
queryParameters → Map<String, dynamic>
Returns a mutable map of the fields contained in the query.
read-only
rawRequest → RawRequest
The underlying RawRequest provided by the driver.
read-only
remoteAddress → InternetAddress
The remote address requesting this resource.
read-only
serviceParams → Map<String, dynamic>
Additional params to be passed to services.
final
session → HttpSession
The user's HTTP session.
read-only
shutdownHooks → List<FutureOr<void> Function()>
Similar to Angel.shutdownHooks, allows for logic to be executed when a RequestContext is done being processed.
final
uploadedFiles → List<UploadedFile>
Returns a mutable map of the files parsed from the request body. [...]
read-only
uri → Uri
The Uri instance representing the path this request is responding to.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

accepts(dynamic contentType, { bool strict: false }) → bool
Returns true if the client's Accept header indicates that the given contentType is considered a valid response. [...]
close() → Future<void>
Disposes of all resources.
@mustCallSuper
parseBody({Encoding encoding: utf8 }) → Future<void>
Manually parses the request body, if it has not already been parsed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited