get method
Future<Response?>
get(
- String path, {
- dynamic data,
- Map<String, dynamic>? queryParameters,
- CancelToken? cancelToken,
- ProgressCallback? onReceiveProgress,
- String contentType = Headers.jsonContentType,
- String accept = ACCEPT_HEADER,
})
Implementation
Future<Response?> get(
String path, {
data,
Map<String, dynamic>? queryParameters,
CancelToken? cancelToken,
ProgressCallback? onReceiveProgress,
String contentType = Headers.jsonContentType,
String accept = ACCEPT_HEADER,
}) async {
if (!checkUrl(path)) {
return null;
}
Future<Response> rsp = getDioByPath(path).get(path,
options: Options(
headers: {
HttpHeaders.acceptHeader: accept,
},
contentType: contentType,
),
queryParameters: queryParameters,
cancelToken: cancelToken,
onReceiveProgress: onReceiveProgress);
return rsp;
}