if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) { if (uri.isAbsoluteURI()) { hostconfig.setHost(uri);
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) { if (uri.isAbsoluteURI()) { hostconfig.setHost(uri);
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) { if (uri.isAbsoluteURI()) { hostconfig.setHost(uri);
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) { if (uri.isAbsoluteURI()) { hostconfig.setHost(uri);
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) { if (uri.isAbsoluteURI()) { hostconfig.setHost(uri);
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ @Override public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
/** * Sets the URI for this method. * * @param uri URI to be set * * @throws URIException if a URI cannot be set * * @since 3.0 */ public void setURI(URI uri) throws URIException { // only set the host if specified by the URI if (uri.isAbsoluteURI()) { this.httphost = new HttpHost(uri); } // set the path, defaulting to root setPath( uri.getPath() == null ? "/" : uri.getEscapedPath() ); setQueryString(uri.getEscapedQuery()); }
@SuppressWarnings("deprecation") public void setURI(org.apache.commons.httpclient.HttpMethodBase m, URI uri) throws URIException { HostConfiguration conf = m.getHostConfiguration(); if (uri.isAbsoluteURI()) { conf.setHost(new HttpHost(uri)); m.setHostConfiguration(conf); } m.setPath(uri.getPath() != null ? uri.getEscapedPath() : "/"); m.setQueryString(uri.getQuery()); }