HttpRequestContext class
An implementation of RequestContext that wraps a HttpRequest.
- Inheritance
-
- Object
- RequestContext<
HttpRequest?> - HttpRequestContext
Constructors
Properties
- acceptsAll → bool
-
Returns as
true
if the client'sAccept
header indicates that it will accept any response content type.no setterinherited - app ↔ Angel?
-
The Angel instance that is responding to this request.
getter/setter pairinherited
-
body
→ Stream<
List< ?int> > -
The Stream of incoming binary data sent from the client.
no setteroverride
- bodyAsList ↔ List?
-
Returns a mutable List parsed from the request body.
getter/setter pairinherited
-
bodyAsMap
↔ Map<
String, dynamic> -
Returns a mutable Map of the fields parsed from the request body.
getter/setter pairinherited
- bodyAsObject ↔ Object?
-
Returns the parsed request body, whatever it may be (typically a Map or List).
getter/setter pairinherited
- container → Container?
-
The IoC container that can be used to provide functionality to produce
objects of a given type.
no setteroverride
- contentType → MediaType
-
The content type of an incoming request.
no setteroverride
-
Any cookies sent with this request.
no setteroverride
- extension → String
-
Returns the file extension of the requested path, if any.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasParsedBody → bool
-
Returns
true
if parseBody has been called so far.no setterinherited - headers → HttpHeaders?
-
All HTTP headers sent with this request.
no setteroverride
- hostname → String
-
The requested hostname.
no setteroverride
- ip → String
-
The user's IP.
no setterinherited
- isXhr → bool
-
Is this an XMLHttpRequest?
no setterinherited
- method → String
-
This request's HTTP method.
no setteroverride
- originalMethod → String
-
The original HTTP verb sent to the server.
no setteroverride
-
params
↔ Map<
String, dynamic> -
The URL parameters extracted from the request URI.
getter/setter pairinherited
- path → String
-
The requested path.
no setteroverride
-
queryParameters
→ Map<
String, dynamic> -
Returns a mutable map of the fields contained in the query.
no setterinherited
- rawRequest → HttpRequest?
-
The underlying HttpRequest instance underneath this context.
no setteroverride
- remoteAddress → InternetAddress
-
The remote address requesting this resource.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serviceParams
→ Map<
String, dynamic> -
Additional params to be passed to services.
finalinherited
- session → HttpSession?
-
The user's HTTP session.
no setteroverride
-
shutdownHooks
→ List<
FutureOr< void> Function()> -
finalinherited
-
uploadedFiles
→ List<
UploadedFile> ? -
Returns a mutable map of the files parsed from the request body.
no setterinherited
- uri → Uri
-
The Uri instance representing the path this request is responding to.
no setteroverride
Methods
-
accepts(
dynamic contentType, {bool strict = false}) → bool -
Returns
true
if the client'sAccept
header indicates that the givencontentType
is considered a valid response.inherited -
close(
) → Future -
Disposes of all resources.
override
-
decodeBody<
T> (Codec< T, Map?> codec, {Encoding encoding = utf8}) → Future<T> -
Shorthand for decoding bodyAsMap, using some
codec
.inherited -
deserializeBody<
T> (FutureOr< T> f(Map?), {Encoding encoding = utf8}) → Future<T> -
Shorthand for deserializing bodyAsMap, using some transformer function
f
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseBody(
{Encoding encoding = utf8}) → Future< void> -
Manually parses the request body, if it has not already been parsed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
from(
HttpRequest request, Angel app, String path) → Future< HttpRequestContext> - Magically transforms an HttpRequest into a RequestContext.