HttpBody class

A wrapper for multiple types of data body.

Properties

asBlob HttpBlob?
no setter
asByteArray List<int>?
no setter
asByteArrayAsync Future<List<int>?>
no setter
asByteBuffer ByteBuffer?
no setter
asByteBufferAsync Future<ByteBuffer?>
no setter
asString String?
no setter
asStringAsync Future<String?>
no setter
hashCode int
The hash code for this object.
no setterinherited
isBlob bool
no setter
isByteBuffer bool
no setter
isBytesArray bool
no setter
isMap bool
no setter
isString bool
no setter
mimeType MimeType?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Alias to asString.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

bytesToString(Uint8List bytes, [MimeType? mimeType]) String
Converts bytes using the encoding specified by mimeType if provided. If mimeType is null or an Encoding cannot be determined, it will attempt to decode using UTF-8, and if that fails, it will try LATIN-1.
from(Object? body, [MimeType? mimeType]) HttpBody?