post<T> abstract method

Future<T> post<T>(
  1. String path,
  2. {Object? body,
  3. Map<String, dynamic>? queryParameters,
  4. Options? options}
)

Performs a POST request to the provided API URL with the given body and returns the response.

  • path: The URL for the POST request.
  • body: (optional) The request body.
  • queryParameters: (optional) The query parameters for the POST request.
  • options: (optional) The options to be merged with the base options.

Returns a Future that completes with the response data of type T.

Throws a DioException if the request fails.

Implementation

Future<T> post<T>(String path,
    {Object? body, Map<String, dynamic>? queryParameters, Options? options});