RequestOptions constructor

RequestOptions({
  1. String? method,
  2. int? sendTimeout,
  3. int? receiveTimeout,
  4. int? connectTimeout,
  5. dynamic data,
  6. required String path,
  7. Map<String, dynamic>? queryParameters,
  8. ProgressCallback? onReceiveProgress,
  9. ProgressCallback? onSendProgress,
  10. CancelToken? cancelToken,
  11. String? baseUrl,
  12. Map<String, dynamic>? extra,
  13. Map<String, dynamic>? headers,
  14. ResponseType? responseType,
  15. String? contentType,
  16. ValidateStatus? validateStatus,
  17. bool? receiveDataWhenStatusError,
  18. bool? followRedirects,
  19. int? maxRedirects,
  20. RequestEncoder? requestEncoder,
  21. ResponseDecoder? responseDecoder,
  22. ListFormat? listFormat,
  23. 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;
}