AdapterRequest constructor

const AdapterRequest({
  1. required String baseUrl,
  2. required String path,
  3. required HttpMethod method,
  4. Map<String, dynamic> pathParams = const {},
  5. Map<String, dynamic> queryParams = const {},
  6. Map<String, dynamic> bodyParams = const {},
  7. dynamic rawBody,
  8. Map<String, dynamic> headers = const {},
  9. String? contentType,
  10. ResponseType responseType = ResponseType.json,
  11. Duration? connectTimeout,
  12. Duration? receiveTimeout,
  13. Duration? sendTimeout,
  14. CancelToken? cancelToken,
  15. Map<String, dynamic> extra = const {},
})

Creates a new AdapterRequest.

Required parameters:

  • baseUrl: The base URL of the API
  • path: The request path
  • method: The HTTP method

All other parameters are optional and have sensible defaults.

Implementation

const AdapterRequest({
  required this.baseUrl,
  required this.path,
  required this.method,
  this.pathParams = const {},
  this.queryParams = const {},
  this.bodyParams = const {},
  this.rawBody,
  this.headers = const {},
  this.contentType,
  this.responseType = ResponseType.json,
  this.connectTimeout,
  this.receiveTimeout,
  this.sendTimeout,
  this.cancelToken,
  this.extra = const {},
});