AdapterRequest constructor
const
AdapterRequest({
- required String baseUrl,
- required String path,
- required HttpMethod method,
- Map<
String, dynamic> pathParams = const {}, - Map<
String, dynamic> queryParams = const {}, - Map<
String, dynamic> bodyParams = const {}, - dynamic rawBody,
- Map<
String, dynamic> headers = const {}, - String? contentType,
- ResponseType responseType = ResponseType.json,
- Duration? connectTimeout,
- Duration? receiveTimeout,
- Duration? sendTimeout,
- CancelToken? cancelToken,
- Map<
String, dynamic> extra = const {},
Creates a new AdapterRequest.
Required parameters:
baseUrl: The base URL of the APIpath: The request pathmethod: 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 {},
});