/** * Execute a transaction method. Will call either <tt>executePathOnly</tt> * or <tt>executeURI</tt> depending on whether a path only is supplied in * 'path', or if a complete URI is passed instead, respectively. * @param cluster the cluster definition * @param method the HTTP method * @param headers HTTP header values to send * @param path the properly urlencoded path or URI * @return the HTTP response code * @throws IOException */ public HttpResponse execute(Cluster cluster, HttpUriRequest method, Header[] headers, String path) throws IOException { if (path.startsWith("/")) { return executePathOnly(cluster, method, headers, path); } return executeURI(method, headers, path); }
method = post; return executeURI(method, headers, uri.toString()); } catch (IOException e) { lastException = e;
/** * Execute a transaction method. Will call either <tt>executePathOnly</tt> * or <tt>executeURI</tt> depending on whether a path only is supplied in * 'path', or if a complete URI is passed instead, respectively. * @param cluster the cluster definition * @param method the HTTP method * @param headers HTTP header values to send * @param path the properly urlencoded path or URI * @return the HTTP response code * @throws IOException */ public HttpResponse execute(Cluster cluster, HttpUriRequest method, Header[] headers, String path) throws IOException { if (path.startsWith("/")) { return executePathOnly(cluster, method, headers, path); } return executeURI(method, headers, path); }
/** * Execute a transaction method. Will call either <tt>executePathOnly</tt> * or <tt>executeURI</tt> depending on whether a path only is supplied in * 'path', or if a complete URI is passed instead, respectively. * @param cluster the cluster definition * @param method the HTTP method * @param headers HTTP header values to send * @param path the properly urlencoded path or URI * @return the HTTP response code * @throws IOException */ public int execute(Cluster cluster, HttpMethod method, Header[] headers, String path) throws IOException { if (path.startsWith("/")) { return executePathOnly(cluster, method, headers, path); } return executeURI(method, headers, path); }
/** * Execute a transaction method. Will call either <tt>executePathOnly</tt> * or <tt>executeURI</tt> depending on whether a path only is supplied in * 'path', or if a complete URI is passed instead, respectively. * @param cluster the cluster definition * @param method the HTTP method * @param headers HTTP header values to send * @param path the properly urlencoded path or URI * @return the HTTP response code * @throws IOException */ public HttpResponse execute(Cluster cluster, HttpUriRequest method, Header[] headers, String path) throws IOException { if (path.startsWith("/")) { return executePathOnly(cluster, method, headers, path); } return executeURI(method, headers, path); }
sb.append(path); URI uri = new URI(sb.toString(), true); return executeURI(method, headers, uri.toString()); } catch (IOException e) { lastException = e;
method = post; return executeURI(method, headers, uri.toString()); } catch (IOException e) { lastException = e;
method = post; return executeURI(method, headers, uri.toString()); } catch (IOException e) { lastException = e;