url method
Generates the complete request URL by combining the base URI and method-specific URI.
Implementation
String url(String uri, String version) {
String url = uri;
if (!url.contains(version)) {
if (url.endsWith("/")) {
url = url + version;
} else {
url = "$url/$version";
}
}
if (url.endsWith("/")) {
url = url.substring(0, url.length - 1);
}
return "$url$pathParams";
}