post method
Does a POST request.
Implementation
Future<HttpResponse> post(
String path, {
Map<String, String>? headers,
bool fullPath = false,
Credential? authorization,
Map<String, Object?>? parameters,
String? queryString,
Object? body,
String? contentType,
String? accept,
String? responseType,
ProgressListener? progressListener,
}) async {
var parametersMapStr = _toParametersMapOfString(parameters);
var url = _buildURL(path, fullPath, parametersMapStr);
var retUrlParameters = _buildURLAndParameters(
url,
parametersMapStr,
queryString,
);
url = retUrlParameters.key;
parametersMapStr = retUrlParameters.value;
var authorizationOr = _buildRequestAuthorization(authorization);
var requestAuthorization = authorizationOr is Future<Authorization?>
? await authorizationOr
: authorizationOr;
return _clientRequester.requestPOST(
this,
url,
headers: headers,
authorization: requestAuthorization,
queryParameters: parametersMapStr,
body: body,
contentType: contentType,
accept: accept,
responseType: responseType,
progressListener: progressListener,
);
}