get method

Future<Response> get(
  1. String path,
  2. {dynamic data,
  3. Map<String, dynamic> queryParameters,
  4. CancelToken cancelToken,
  5. ProgressCallback onReceiveProgress,
  6. String contentType = Headers.jsonContentType,
  7. 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;
}