post abstract method

Future<HttpResponse> post({
  1. required String url,
  2. required String body,
  3. required Map<String, String> headers,
  4. Duration? timeout,
})

Sends a POST request and returns the raw status code and body.

timeout is advisory; implementations should honor it when supported and surface timeouts as exceptions rather than swallowing them.

Implementation

Future<HttpResponse> post({
  required String url,
  required String body,
  required Map<String, String> headers,
  Duration? timeout,
});