RequestBody class
Objects that represent a request body, and can be decoded into Dart objects.
Every instance of Request has a Request.body property of this type. Use decode to convert the contents of this object into a Dart type (e.g, Map or List).
See also CodecRegistry for how decoding occurs.
- Inheritance
-
- Object
- BodyDecoder
- RequestBody
Constructors
- RequestBody(HttpRequest request)
- Creates a new instance of this type.
Properties
-
bytes
→ Stream<
List< int> > -
The stream of bytes to decode.
no setteroverride
- contentType → ContentType?
-
Determines how bytes get decoded.
no setteroverride
- decodedType → Type
-
The type of data bytes was decoded into.
no setterinherited
- hasBeenDecoded → bool
-
Whether or not bytes have been decoded yet.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether or not bytes is empty.
no setteroverride
- isFormData → bool
-
no setter
-
originalBytes
→ List<
int> -
The raw bytes of this request body.
no setterinherited
- retainOriginalBytes ↔ bool
-
Whether or not bytes are available as a list after decoding has occurred.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
as<
T> () → T -
Returns previously decoded object as
T
.inherited -
decode<
T> () → Future< T> -
Decodes this object's bytes as
T
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited