request method

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

Does a request using method.

Implementation

Future<HttpResponse> request(HttpMethod method, String path,
    {bool fullPath = false,
    Map<String, String>? headers,
    Credential? authorization,
    Map<String, Object?>? parameters,
    String? queryString,
    Object? body,
    String? contentType,
    String? accept,
    bool noQueryString = false,
    ProgressListener? progressListener}) async {
  var parametersMapStr = _toParametersMapOfString(parameters);
  var url = buildMethodRequestURL(method, path, fullPath, parametersMapStr);

  var retUrlParameters =
      _buildURLAndParameters(url, parametersMapStr, queryString);
  url = retUrlParameters.key;
  parametersMapStr = retUrlParameters.value;

  return requestURL(method, url,
      headers: headers,
      authorization: authorization,
      queryParameters: parametersMapStr,
      body: body,
      contentType: contentType,
      accept: accept,
      noQueryString: noQueryString,
      progressListener: progressListener);
}