/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 * */ public TraceMethod(String uri) { super(uri); setFollowRedirects(false); }
httpMethod = new OptionsMethod(); } else if (method == HttpMethod.TRACE) { return new TraceMethod(uri.getEscapedURI()); } else { throw new HttpClientException("unknown request method "
@SuppressWarnings("deprecation") public URI getURI() throws URIException { return URIBuilder.newURI(this, super.getHostConfiguration()); }
protected HttpMethod createTraceMethod(MuleMessage message) throws Exception { URI uri = getURI(message); return new TraceMethod(uri.toString()); }
public static HttpMethodBase createMethod(URL url, int type) { HttpMethodBase request = null; switch( type ) { case GET: request = new GetMethod(url.toString()); break; case POST: request = new PostMethod(url.toString()); break; case HEAD: request = new HeadMethod(url.toString()); break; case OPTIONS: request = new OptionsMethod(url.toString()); break; case PUT: request = new PutMethod(url.toString()); break; case DELETE: request = new DeleteMethod(url.toString()); break; case TRACE: request = new TraceMethod(url.toString()); break; } return request; } }
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @since 2.0 * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { super.recycle(); setFollowRedirects(false); }
httpMethod = new HeadMethod(urlStr); } else if (method.equals(TRACE)) { httpMethod = new TraceMethod(urlStr); } else if (method.equals(OPTIONS)) { httpMethod = new OptionsMethod(urlStr);
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 * */ public TraceMethod(String uri) { super(uri); setFollowRedirects(false); }
httpMethod = new HeadMethod(urlStr); } else if (method.equals(HTTPConstantsInterface.TRACE)) { httpMethod = new TraceMethod(urlStr); } else if (method.equals(HTTPConstantsInterface.OPTIONS)) { httpMethod = new OptionsMethod(urlStr);
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 * */ public TraceMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * Create a Commons HttpMethodBase object for the given HTTP method and URI specification. * @param httpMethod the HTTP method * @param uri the URI * @return the Commons HttpMethodBase object */ protected HttpMethodBase createCommonsHttpMethod(HttpMethod httpMethod, String uri) { switch (httpMethod) { case GET: return new GetMethod(uri); case DELETE: return new DeleteMethod(uri); case HEAD: return new HeadMethod(uri); case OPTIONS: return new OptionsMethod(uri); case POST: return new PostMethod(uri); case PUT: return new PutMethod(uri); case TRACE: return new TraceMethod(uri); default: throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod); } }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 * */ public TraceMethod(String uri) { super(uri); setFollowRedirects(false); }
method = new TraceMethod(path); break;
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 * */ public TraceMethod(String uri) { super(uri); setFollowRedirects(false); }
method = new TraceMethod(path); break;
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @since 2.0 * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { super.recycle(); setFollowRedirects(false); }
method = new TraceMethod(path); break;
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @since 2.0 * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { super.recycle(); setFollowRedirects(false); }
httpMethod = new HeadMethod(urlString); } else if ((method.equalsIgnoreCase("TRACE"))) { httpMethod = new TraceMethod(urlString); } else if ((method.equalsIgnoreCase("OPTIONS"))) { httpMethod = new OptionsMethod(urlString);
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @since 2.0 * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { super.recycle(); setFollowRedirects(false); }