/** * Set the path that this request is supposed to be serving. The path is relative to the web * application root and should start with a / character * * @param path */ public void setPath(final String path) { this.path = UrlDecoder.PATH_INSTANCE.decode(path, getCharset()); }
/** * Set the path that this request is supposed to be serving. The path is relative to the web * application root and should start with a / character * * @param path */ public void setPath(final String path) { this.path = UrlDecoder.PATH_INSTANCE.decode(path, getCharset()); }
buf.append(UrlEncoder.QUERY_INSTANCE.encode(name, getCharset())); buf.append(UrlEncoder.QUERY_INSTANCE.encode(values[i], getCharset()));
buf.append(UrlEncoder.QUERY_INSTANCE.encode(name, getCharset())); buf.append(UrlEncoder.QUERY_INSTANCE.encode(values[i], getCharset()));
String path = url.getPath(getCharset());
String path = url.getPath(getCharset());
/** * @return request url */ public Url getUrl() { final String urlString; final String queryString = getQueryString(); if (Strings.isEmpty(queryString)) { urlString = getRequestURI(); } else { urlString = getRequestURI() + '?' + queryString; } final Url url = Url.parse(urlString, getCharset()); url.setProtocol(scheme); url.setHost(serverName); url.setPort(serverPort); return url; }
/** * @return request url */ public Url getUrl() { final String urlString; final String queryString = getQueryString(); if (Strings.isEmpty(queryString)) { urlString = getRequestURI(); } else { urlString = getRequestURI() + '?' + queryString; } final Url url = Url.parse(urlString, getCharset()); url.setProtocol(scheme); url.setHost(serverName); url.setPort(serverPort); return url; }