CommonRequestOptions class

Constructors

CommonRequestOptions({Map<String, String>? headers, String contentType = 'application/json'})

Properties

contentType String
The request Content-Type. The default value is ContentType.json. If you want to encode request body with 'application/x-www-form-urlencoded', you can set ContentType.parse('application/x-www-form-urlencoded'), and Dio will automatically encode the request body.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
Http request headers. The keys of initial headers will be converted to lowercase, for example 'Content-Type' will be converted to 'content-type'.
getter/setter pair
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
toString() String
A string representation of this object.
inherited

Operators

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