post method
override
Sends a POST request to the specified url.
Optionally, you can specify custom headers and a request body.
Returns a Future that completes with an HttpResponse when the request is complete.
Implementation
@override
Future<HttpResponse> post(String url,
{Map<String, String>? headers, body}) async {
log.fine("Sending POST request to $url");
var r = await dio.post(url, data: body, options: Options(headers: headers));
log.fine("POST request to $url returned ${r.statusCode} [data redacted]}");
return HttpResponse(statusCode: r.statusCode, body: r.data);
}