post method

  1. @override
Future<RequestResponse<Response>> post(
  1. Uri url, {
  2. Map<String, String>? headers,
  3. Object? body,
  4. Encoding? encoding,
  5. Object? options,
})
override

Sends an HTTP POST request to submit data.

  • url: The target URI.
  • headers: Optional HTTP headers.
  • body: The payload to send. Can be a Map, List, or raw String.
  • encoding: The encoding to use for the body (defaults to UTF-8 in most clients).
  • options: Extra configuration specific to the underlying client implementation.

Implementation

@override
Future<RequestResponse<Response>> post(
  Uri url, {
  Map<String, String>? headers,
  Object? body,
  Encoding? encoding,
  Object? options,
}) {
  return _executeRequest(
    url,
    headers: headers,
    body: body,
    encoding: encoding,
    options: options,
    type: RequestType.post,
  );
}