post method

Future<HttpResponse> post(
  1. String path, {
  2. Map<String, String>? headers,
  3. bool fullPath = false,
  4. Credential? authorization,
  5. Map<String, Object?>? parameters,
  6. String? queryString,
  7. Object? body,
  8. String? contentType,
  9. String? accept,
  10. String? responseType,
  11. ProgressListener? progressListener,
})

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 requestAuthorization = await _buildRequestAuthorization(authorization);
  return _clientRequester.requestPOST(this, url,
      headers: headers,
      authorization: requestAuthorization,
      queryParameters: parametersMapStr,
      body: body,
      contentType: contentType,
      accept: accept,
      responseType: responseType,
      progressListener: progressListener);
}