Body class
HTTP Body.
Essentially it is just a Stream<Uint8List>
with a few
useful constructors.
- Available Extensions
Constructors
- Body()
- Creates a new empty body.
- Body.binary(Uint8List data)
-
Create a new instance from a single piece of binary
data
.. - Body.json(Object? object)
-
Creates a new instance by encoding the
object
into JSON. This method always uses UTF-8 encoding. -
Body.stream(Stream<
Uint8List> bytes) - Creates a new instance from a binary stream.
- Body.text(String text, Encoding encoding)
-
Create a new instance from
text
encoded withencoding
.
Properties
Methods
-
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