PostParams class base

Parameters for POST requests.

Includes a specialized constructor for x-www-form-urlencoded payloads.

Inheritance

Constructors

PostParams({Map<String, String>? headers, Object? encodeBody()?, Map<String, dynamic>? urlParams, Object? driverOptions, Encoding? encoding})
const
PostParams.xWwwFormUrlencoded({required Map<String, String> formFields, Map<String, String>? headers = const {'content-type' : 'application/x-www-form-urlencoded'}, Encoding encoding = utf8, Map<String, dynamic>? urlParams})
Creates parameters for a request with application/x-www-form-urlencoded body.

Properties

driverOptions → Object?
Client-specific configuration (e.g., Dio's Options or CancelToken).
finalinherited
encodeBody → Object? Function()?
A callback that handles the serialization of the request body.
finalinherited
encoding → Encoding?
The character encoding for the request body. Defaults to utf8 in most drivers.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>?
Custom HTTP headers for the request.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
urlParams → Map<String, dynamic>?
Query parameters to be appended to the URL.
finalinherited

Methods

modifyUriWithUrlParams(Uri uri) → Uri
Helper function to merge the base uri with specific RequestParams.
inherited
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