Body class abstract

An interface for accessing content body as String, bytes or JSON objects.

Implementers

Constructors

Body()
Default const constructor to allow extending this abstract class.
const

Properties

bytes Future<Uint8List>
Reads content body as bytes and returns a future of Uint8List.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text Future<String>
Reads content body as text and returns a future of String.
no setter

Methods

byteData([int start = 0, int? end]) Future<ByteData>
Reads content body as bytes and returns a future of ByteData.
byteStream() Stream<List<int>>
Returns content body as a single-subscription byte stream.
decodeJson({Object? reviver(Object? key, Object? value)?}) Future
Reads and decodes content body as a JSON object, returned in a future.
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