FetchRequest class abstract

Constructors

FetchRequest()

Properties

bodyUsed bool
no setter
closed bool
no setter
hashCode int
The hash code for this object.
no setterinherited
headers HttpxHeaders
no setter
method String
no setter
options FetchOptions
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url Uri
no setter

Methods

close() Future<FetchResponse>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
writeData(List<int> data, {bool ignoreContentEncoding = true}) Future<void>
writeString(String string) Future<void>
writeStructuredData(dynamic structuredData, {StructuredDataEncoder? encoder}) Future<FetchResponse>
structuredData will be transformed by either the structuredDataEncoder in parameter, or, if it is not provided and based on request's content-type, it will pass the result to the matching options.structuredDataEncoders (or the builtins ones). If none match, it will fail with an exception. Calling this method will automatically close the request.
writeTypedData<T extends Object?>(T typedData, {TypedDataEncoder? encoder, StructuredDataEncoder? structuredDataEncoder}) Future<FetchResponse>
typedData will be transformed to structuredData by either the typedDataEncoder in argument or, if none is provided, the options.typedDataEncoder, or, if none is defined, a pass-through. Then, it will pass the result to the structuredDataEncoder in parameter, or, if it is not provided and based on request's content-type, it will pass the result to the matching options.structuredDataEncoders (or the builtins ones). If none match, it will fail with an exception. Calling this method will automatically close the request.

Operators

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