/** * 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()); }
private HttpMethodBase setQueryString(HttpMethodBase method) { Map<String, List<String>> value = getNameValuePairs(query, "query"); if (value != null) { List<NameValuePair> pairs = new ArrayList<NameValuePair>(); for (Map.Entry<String, List<String>> entry : value.entrySet()) { for (String v : entry.getValue()) { pairs.add(new NameValuePair(entry.getKey(), v)); } } method.setQueryString(pairs.toArray(new NameValuePair[pairs.size()])); } else if (query != null) { method.setQueryString(query.toString()); } return method; }
private HttpMethodBase setQueryString(HttpMethodBase method) { Map<String, List<String>> value = getNameValuePairs(query, "query"); if (value != null) { List<NameValuePair> pairs = new ArrayList<NameValuePair>(); for (Map.Entry<String, List<String>> entry : value.entrySet()) { for (String v : entry.getValue()) { pairs.add(new NameValuePair(entry.getKey(), v)); } } method.setQueryString(pairs.toArray(new NameValuePair[pairs.size()])); } else if (query != null) { method.setQueryString(query.toString()); } return method; }
boolean connected = false; try { method.setQueryString(params); String errMsg = null; int retried = retry;
method = new GetMethod(url.toString()); if (queryParams != null && queryParams.size() > 0) { method.setQueryString(params);
method.setQueryString(params.toArray(nvp));
httpMethod.setQueryString((NameValuePair[]) pairs.toArray(new NameValuePair[pairs.size()]));
try { if (null != queryString) { httpClientMethod.setQueryString(queryString);
method.setQueryString(finalUri.substring(finalUri.lastIndexOf("?")));
httpMethod.setQueryString(url.getQuery());
method.setQueryString(url.getQuery());
/** * 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()); }
/** * 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()); }
@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()); }
String queryString = webRequestSettings.getUrl().getQuery(); queryString = webClient_.encodeQuery(queryString, true); httpMethod.setQueryString(queryString); httpMethod.setQueryString(pairs);
String queryString = webRequestSettings.getUrl().getQuery(); queryString = webClient_.encodeQuery(queryString, true); httpMethod.setQueryString(queryString); httpMethod.setQueryString(pairs);
context.getHttpMethod().setQueryString(query);