RequestOptions class
The internal request option class that is the eventual result after BaseOptions and Options are composed.
- Mixed-in types
- Available extensions
Constructors
-
RequestOptions({String path = '', dynamic data, ProgressCallback? onReceiveProgress, ProgressCallback? onSendProgress, CancelToken? cancelToken, String? method, Duration? sendTimeout, Duration? receiveTimeout, Duration? connectTimeout, Map<
String, dynamic> ? queryParameters, String? baseUrl, Map<String, dynamic> ? extra, Map<String, dynamic> ? headers, bool? preserveHeaderCase, ResponseType? responseType, String? contentType, ValidateStatus? validateStatus, bool? receiveDataWhenStatusError, bool? followRedirects, int? maxRedirects, bool? persistentConnection, RequestEncoder? requestEncoder, ResponseDecoder? responseDecoder, ListFormat? listFormat, bool? setRequestContentTypeWhenNoPayload, StackTrace? sourceStackTrace})
Properties
- baseUrl ↔ String
-
Request base url, it can be multiple forms:
getter/setter pairinherited
- cancelToken ↔ CancelToken?
-
Controls cancellation of Dio's requests.
getter/setter pair
- connectTimeout ↔ Duration?
-
Timeout when opening a request.
getter/setter pairinherited
- contentType ↔ String?
-
getter/setter pairinherited
- data ↔ dynamic
-
Request data in dynamic types.
getter/setter pair
-
extra
↔ Map<
String, dynamic> -
getter/setter pairinherited
- followRedirects ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, dynamic> -
getter/setter pairinherited
- listFormat ↔ ListFormat
-
getter/setter pairinherited
- maxRedirects ↔ int
-
getter/setter pairinherited
- method ↔ String
-
getter/setter pairinherited
- onReceiveProgress ↔ ProgressCallback?
-
The type of a progress listening callback when sending or receiving data.
getter/setter pair
- onSendProgress ↔ ProgressCallback?
-
The type of a progress listening callback when sending or receiving data.
getter/setter pair
- path ↔ String
-
Defines the path of the request. If it starts with "http(s)",
baseUrl will be ignored. Otherwise, it will be combined and resolved
with the baseUrl.
getter/setter pair
- persistentConnection ↔ bool
-
getter/setter pairinherited
- preserveHeaderCase ↔ bool
-
getter/setter pairinherited
-
queryParameters
↔ Map<
String, dynamic> -
Common query parameters.
getter/setter pairinherited
- receiveDataWhenStatusError ↔ bool
-
getter/setter pairinherited
- receiveTimeout ↔ Duration?
-
getter/setter pairinherited
- requestEncoder ↔ RequestEncoder?
-
getter/setter pairinherited
- responseDecoder ↔ ResponseDecoder?
-
getter/setter pairinherited
- responseType ↔ ResponseType
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendTimeout ↔ Duration?
-
getter/setter pairinherited
- sourceStackTrace ↔ StackTrace?
-
The source StackTrace which should always point to the invocation of
DioMixin.request or if not provided, to the construction of the
RequestOptions instance. In both instances the source context should
still be available before it is lost due to asynchronous operations.
getter/setter pair
- uri → Uri
-
Generate the requesting Uri from the options.
no setter
- validateStatus ↔ ValidateStatus
-
getter/setter pairinherited
Methods
-
copyWith(
{String? method, Duration? sendTimeout, Duration? receiveTimeout, Duration? connectTimeout, dynamic data, String? path, Map< String, dynamic> ? queryParameters, String? baseUrl, ProgressCallback? onReceiveProgress, ProgressCallback? onSendProgress, CancelToken? cancelToken, Map<String, dynamic> ? extra, Map<String, dynamic> ? headers, bool? preserveHeaderCase, ResponseType? responseType, String? contentType, ValidateStatus? validateStatus, bool? receiveDataWhenStatusError, bool? followRedirects, int? maxRedirects, bool? persistentConnection, RequestEncoder? requestEncoder, ResponseDecoder? responseDecoder, ListFormat? listFormat, bool? setRequestContentTypeWhenNoPayload}) → RequestOptions - Create a RequestOptions from current instance with merged attributes.
-
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