buildRequestURL method
String
buildRequestURL(
- HttpClient client,
- String url, {
- Authorization? authorization,
- Map<
String, String?> ? queryParameters, - bool noQueryString = false,
Helper to build the request URL.
Implementation
String buildRequestURL(HttpClient client, String url,
{Authorization? authorization,
Map<String, String?>? queryParameters,
bool noQueryString = false}) {
if (queryParameters != null && queryParameters.isNotEmpty) {
url = buildURLWithQueryParameters(url, queryParameters,
removeFragment: true);
}
if (authorization != null && authorization.isCredentialResolved) {
var authorizationURL = authorization.resolvedCredential!.buildURL(url);
if (authorizationURL != null) return authorizationURL;
}
if (noQueryString) {
url = removeUriQueryString(url).toString();
}
return url;
}