post method

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

POST请求

Implementation

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