httpMethod = new DeleteMethod(); } else if (method == HttpMethod.OPTIONS) { httpMethod = new OptionsMethod(); } else if (method == HttpMethod.TRACE) { return new TraceMethod(uri.getEscapedURI());
protected HttpMethod createOptionsMethod(MuleMessage message) throws Exception { URI uri = getURI(message); return new OptionsMethod(uri.toString()); }
public static Enumeration getAllowedMethods() { Enumeration e = new OptionsMethod().getAllowedMethods(); return e; }
public static Enumeration getAllowedMethods() { Enumeration e = new OptionsMethod().getAllowedMethods(); return e; }
private HttpMethod resolveMethod(String method, String uri) throws AuthenticationException { if (method.equalsIgnoreCase("get")) { return new GetMethod(uri); } else if (method.equalsIgnoreCase("post")) { return new PostMethod(uri); } else if (method.equalsIgnoreCase("put")) { return new PutMethod(uri); } else if (method.equalsIgnoreCase("delete")) { return new DeleteMethod(uri); } else if (method.equalsIgnoreCase("head")) { return new HeadMethod(uri); } else if (method.equalsIgnoreCase("options")) { return new OptionsMethod(uri); } else { // throw new AuthenticationException("unsupported http method : " + method); return new MethodHelper.ExtensionMethod(method, uri); } }
private HttpMethod getHttpMethod(ClientRequest cr) { final String strMethod = cr.getMethod(); final String uri = cr.getURI().toString(); if (strMethod.equals("GET")) { return new GetMethod(uri); } else if (strMethod.equals("POST")) { return new PostMethod(uri); } else if (strMethod.equals("PUT")) { return new PutMethod(uri); } else if (strMethod.equals("DELETE")) { return new CustomMethod("DELETE", uri); } else if (strMethod.equals("HEAD")) { return new HeadMethod(uri); } else if (strMethod.equals("OPTIONS")) { return new OptionsMethod(uri); } else { return new CustomMethod(strMethod, uri); } }
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; } }
httpMethod = new TraceMethod(urlStr); } else if (method.equals(OPTIONS)) { httpMethod = new OptionsMethod(urlStr); } else if (method.equals(DELETE)) { httpMethod = new DeleteMethod(urlStr);
httpMethod = new TraceMethod(urlStr); } else if (method.equals(HTTPConstantsInterface.OPTIONS)) { httpMethod = new OptionsMethod(urlStr); } else if (method.equals(HTTPConstantsInterface.DELETE)) { httpMethod = new DeleteMethod(urlStr);
/** * 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); } }
method = new OptionsMethod(path); break;
method = new OptionsMethod(path); break;
method = new OptionsMethod(path); break;
httpMethod = new TraceMethod(urlString); } else if ((method.equalsIgnoreCase("OPTIONS"))) { httpMethod = new OptionsMethod(urlString); } else throw new IOException("Method not supported: " + method);
httpMethod = new TraceMethod(urlString); } else if ((method.equalsIgnoreCase("OPTIONS"))) { httpMethod = new OptionsMethod(urlString); } else throw new IOException("Method not supported: " + method);
break; case Options: this.method = new OptionsMethod(uri); break; default:
break; case Options: method = new OptionsMethod(urlencoded); break; default:
@Override protected void doOptions(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException { ProxyDetails proxyDetails = createProxyDetails(httpServletRequest, httpServletResponse); if (!proxyDetails.isValid()) { noMappingFound(httpServletRequest, httpServletResponse); } else { OptionsMethod optionsMethodProxyRequest = new OptionsMethod(proxyDetails.getStringProxyURL()); setProxyRequestHeaders(proxyDetails, httpServletRequest, optionsMethodProxyRequest); executeProxyRequest(proxyDetails, optionsMethodProxyRequest, httpServletRequest, httpServletResponse); } }
@Override protected void doOptions(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException { ProxyDetails proxyDetails = createProxyDetails(httpServletRequest, httpServletResponse); if (!proxyDetails.isValid()) { noMappingFound(httpServletRequest, httpServletResponse); } else { OptionsMethod optionsMethodProxyRequest = new OptionsMethod(proxyDetails.getStringProxyURL()); setProxyRequestHeaders(proxyDetails, httpServletRequest, optionsMethodProxyRequest); executeProxyRequest(proxyDetails, optionsMethodProxyRequest, httpServletRequest, httpServletResponse); } }
httpMethod = new DeleteMethod(); } else if (method == HttpMethod.OPTIONS) { httpMethod = new OptionsMethod(); } else if (method == HttpMethod.TRACE) { return new TraceMethod(uri.getEscapedURI());