post method

Future<Response> post(
  1. (Uri, Map<String, String>) composedRequest, {
  2. Duration timeout = const Duration(seconds: 30),
  3. Map<String, String>? headers,
})

Sends a POST request to the specified url.

Implementation

Future<http.Response> post(
  (Uri, Map<String, String>) composedRequest, {
  Duration timeout = const Duration(seconds: 30),
  Map<String, String>? headers,
}) async {
  final url = composedRequest.$1;
  final body = composedRequest.$2;
  return await http
      .post(url, headers: headers, body: body)
      .handleExceptions(timeout: timeout);
}