post method

Future<Response> post(
  1. String url, {
  2. dynamic data,
  3. Map<String, dynamic>? queryParameters,
  4. Options? options,
  5. ProgressCallback? onSendProgress,
  6. ProgressCallback? onReceiveProgress,
})

Implementation

Future<Response> post(
  String url, {
  data,
  Map<String, dynamic>? queryParameters,
  Options? options,
  ProgressCallback? onSendProgress,
  ProgressCallback? onReceiveProgress,
}) async {
  try {
    final Response response = await _dio.post(
      url,
      data: data,
      queryParameters: queryParameters,
      options: options,
      onSendProgress: onSendProgress,
      onReceiveProgress: onReceiveProgress,
    );
    return response;
  } catch (e) {
    rethrow;
  }
}