/** * Creates a new http request of the given base url and relative path. */ default HttpRequest request(String baseUrl, String path) { return request(Paths.suffixWithoutSlash(baseUrl) + Paths.prefixWithSlash(path)); }
protected String parseUrl(String url,ServerInfo serverInfo){ if(!needParse(url)){ return url; } URI uri = URI.create(Strings.replace(serverInfo.getServerUrl(), " ", "%20")); String resolvedUrl = Urls.resolveUrlExpr(url, uri); if(needParse(resolvedUrl)){ return serverInfo.getServerUrl()+Paths.prefixWithSlash(resolvedUrl); } return resolvedUrl; }