MultiPartBodySerializer class

Serializes a multipart request body. If your have your parts in an Iterable, you can use SyncMultiPartBodySerializer.

Constructors

MultiPartBodySerializer.new({String? boundary, Stream<HttpPacketMixin> parts = const Stream.empty(), Random? random})
const

Properties

boundary String?
final
hashCode int
The hash code for this object.
no setterinherited
parts Stream<HttpPacketMixin>
final
random Random?
final
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
serialize() Future<MultiPartBodySerializationResult>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

bodyBytesStream(Iterable<HttpPacketMixin> partsList, String boundary) Stream<List<int>>
contentLength(Iterable<HttpPacketMixin> partsList, String boundary) int?
getFormDataParts({Map<String, String>? fields, List<MultiPartFormDataFileHttpPacket>? files}) Iterable<HttpPacketMixin>
getRandomBoundaryString(Random random) String
The total length of the multipart boundaries used when building the request body.