buildRequestURL method

String buildRequestURL(
  1. HttpMethod method,
  2. String path, {
  3. bool fullPath = false,
  4. Authorization? authorization,
  5. Map<String, Object?>? parameters,
  6. String? queryString,
  7. bool noQueryString = false,
})

Builds a Request URL, with the same rules of requestURL.

Implementation

String buildRequestURL(HttpMethod method, String path,
    {bool fullPath = false,
    Authorization? authorization,
    Map<String, Object?>? parameters,
    String? queryString,
    bool noQueryString = false}) {
  var parametersMapStr = _toParametersMapOfString(parameters);
  var url = buildMethodRequestURL(method, path, fullPath, parametersMapStr);

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

  return _clientRequester.buildRequestURL(this, url,
      authorization: authorization,
      queryParameters: parametersMapStr,
      noQueryString: noQueryString);
}