RequestOptions constructor
RequestOptions({
- String? method,
- int? sendTimeout,
- int? receiveTimeout,
- int? connectTimeout,
- dynamic data,
- required String path,
- Map<
String, dynamic> ? queryParameters, - ProgressCallback? onReceiveProgress,
- ProgressCallback? onSendProgress,
- CancelToken? cancelToken,
- String? baseUrl,
- Map<
String, dynamic> ? extra, - Map<
String, dynamic> ? headers, - ResponseType? responseType,
- String? contentType,
- ValidateStatus? validateStatus,
- bool? receiveDataWhenStatusError,
- bool? followRedirects,
- int? maxRedirects,
- RequestEncoder? requestEncoder,
- ResponseDecoder? responseDecoder,
- ListFormat? listFormat,
- bool? setRequestContentTypeWhenNoPayload,
Implementation
RequestOptions({
String? method,
int? sendTimeout,
int? receiveTimeout,
int? connectTimeout,
this.data,
required this.path,
Map<String, dynamic>? queryParameters,
this.onReceiveProgress,
this.onSendProgress,
this.cancelToken,
String? baseUrl,
Map<String, dynamic>? extra,
Map<String, dynamic>? headers,
ResponseType? responseType,
String? contentType,
ValidateStatus? validateStatus,
bool? receiveDataWhenStatusError,
bool? followRedirects,
int? maxRedirects,
RequestEncoder? requestEncoder,
ResponseDecoder? responseDecoder,
ListFormat? listFormat,
bool? setRequestContentTypeWhenNoPayload,
}) : super(
method: method,
sendTimeout: sendTimeout,
receiveTimeout: receiveTimeout,
extra: extra,
headers: headers,
responseType: responseType,
contentType: contentType,
validateStatus: validateStatus,
receiveDataWhenStatusError: receiveDataWhenStatusError,
followRedirects: followRedirects,
maxRedirects: maxRedirects,
requestEncoder: requestEncoder,
responseDecoder: responseDecoder,
listFormat: listFormat,
) {
this.queryParameters = queryParameters ?? {};
this.baseUrl = baseUrl ?? '';
this.connectTimeout = connectTimeout ?? 0;
}