get method

Future<Response?> get(
  1. String path, {
  2. Map<String, dynamic>? params,
  3. CancelToken? cancelToken,
  4. Map<String, dynamic>? headers,
})

GET请求

Implementation

Future<Response?> get(
  String path, {
  Map<String, dynamic>? params,
  CancelToken? cancelToken,
  Map<String, dynamic>? headers,
}) async {
  Options options = Options(method: 'get', headers: headers);
  return await request(
    path,
    options: options,
    params: params,
    cancelToken: cancelToken,
  );
}