BaseOptions constructor
BaseOptions({
- String? method,
- int? connectTimeout,
- int? receiveTimeout,
- int? sendTimeout,
- String baseUrl = '',
- Map<
String, dynamic> ? queryParameters, - Map<
String, dynamic> ? extra, - Map<
String, dynamic> ? headers, - ResponseType? responseType = ResponseType.json,
- String? contentType,
- ValidateStatus? validateStatus,
- bool? receiveDataWhenStatusError,
- bool? followRedirects,
- int? maxRedirects,
- RequestEncoder? requestEncoder,
- ResponseDecoder? responseDecoder,
- ListFormat? listFormat,
- bool setRequestContentTypeWhenNoPayload = false,
Implementation
BaseOptions({
String? method,
int? connectTimeout,
int? receiveTimeout,
int? sendTimeout,
String baseUrl = '',
Map<String, dynamic>? queryParameters,
Map<String, dynamic>? extra,
Map<String, dynamic>? headers,
ResponseType? responseType = ResponseType.json,
String? contentType,
ValidateStatus? validateStatus,
bool? receiveDataWhenStatusError,
bool? followRedirects,
int? maxRedirects,
RequestEncoder? requestEncoder,
ResponseDecoder? responseDecoder,
ListFormat? listFormat,
this.setRequestContentTypeWhenNoPayload = false,
}) : super(
method: method,
receiveTimeout: receiveTimeout,
sendTimeout: sendTimeout,
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;
}