Body class final

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 with encoding.

Properties

bytes Stream<Uint8List>
Request body as a binary stream.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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