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.



RequestBody(HttpRequest request)
Creates a new instance of this type. [...]


bytes → Stream<List<int>>
The stream of bytes to decode. [...]
read-only, override
contentType → ContentType
Determines how bytes get decoded. [...]
read-only, override
isEmpty → bool
Whether or not bytes is empty. [...]
read-only, override
decodedType → Type
The type of data bytes was decoded into. [...]
read-only, inherited
hasBeenDecoded → bool
Whether or not bytes have been decoded yet. [...]
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
originalBytes → List<int>
The raw bytes of this request body. [...]
read-only, inherited
retainOriginalBytes ↔ bool
Whether or not bytes are available as a list after decoding has occurred. [...]
read / write, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


as<T>() → T
Returns previously decoded object as T. [...]
decode<T>() → Future<T>
Decodes this object's bytes as T. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() → String
Returns a string representation of this object.


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

Static Properties

maxSize ↔ int
The maximum size of a request body. [...]
read / write