post method
Sends an HTTP POST request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
Implementation
@override
Future<http.Response> post(Uri url,
{Map<String, String>? headers,
Object? body,
Encoding? encoding}) async =>
client == null
? await http.post(
url,
headers: await newHeaders(headers),
body: body,
encoding: encoding,
)
: await client!.post(
url,
headers: headers,
body: body,
encoding: encoding,
);