Example usage for org.apache.http.client.methods HttpTrace HttpTrace

List of usage examples for org.apache.http.client.methods HttpTrace HttpTrace

Introduction

In this page you can find the example usage for org.apache.http.client.methods HttpTrace HttpTrace.

Prototype

public HttpTrace() 

Source Link

Usage

From source file:net.javacrumbs.restfire.httpcomponents.HttpComponentsRequestFactory.java

public RequestBuilder trace() {
    return createRequestBuilder(new HttpTrace());
}

From source file:pt.sapo.pai.vip.VipServlet.java

@Override
protected void doTrace(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    processRequest(request, response, () -> new HttpTrace());
}

From source file:com.lonepulse.zombielink.request.RequestUtils.java

/**
 * <p>Retrieves the proper extension of {@link HttpRequestBase} for the given {@link InvocationContext}. 
 * This implementation is solely dependent upon the {@link RequestMethod} property in the annotated 
 * metdata of the endpoint method definition.</p>
 *
 * @param context/*w  ww.j a va 2  s . c  o m*/
 *          the {@link InvocationContext} for which a {@link HttpRequestBase} is to be generated 
 * <br><br>
 * @return the {@link HttpRequestBase} translated from the {@link InvocationContext}'s {@link RequestMethod}
 * <br><br>
 * @throws NullPointerException
 *          if the supplied {@link InvocationContext} was {@code null} 
 * <br><br>
 * @since 1.3.0
 */
static HttpRequestBase translateRequestMethod(InvocationContext context) {

    RequestMethod requestMethod = Metadata.findMethod(assertNotNull(context).getRequest());

    switch (requestMethod) {

    case POST:
        return new HttpPost();
    case PUT:
        return new HttpPut();
    case PATCH:
        return new HttpPatch();
    case DELETE:
        return new HttpDelete();
    case HEAD:
        return new HttpHead();
    case TRACE:
        return new HttpTrace();
    case OPTIONS:
        return new HttpOptions();

    case GET:
    default:
        return new HttpGet();
    }
}

From source file:org.easyj.http.EasyRESTHttpClient.java

/**
 * Executes a TRACE HTTP request and returns the body response as {@code String}
 *
 * @param uri URI of the resource to be requested
 * @return The body response of the request as {@code String}
 *//*from   w ww  . ja  v  a 2 s .c  o m*/
public EasyRESTHttpClient trace(String uri) {
    method = new HttpTrace();
    return execute(uri);
}

From source file:org.easyj.http.EasyHttpClient.java

/**
 * Executes a TRACE HTTP request and returns the body response as {@code String}
 *
 * @param uri URI of the resource to be requested
 * @return The body response of the request as {@code String}
 *///  w  w w.j a  v a2 s .co  m
public EasyHttpClient trace(String uri) {
    method = new HttpTrace();
    return execute(uri);
}

From source file:com.naryx.tagfusion.cfm.http.cfHttpConnection.java

private HttpUriRequest resolveMethod(String _method, boolean _multipart) throws cfmRunTimeException {
    String method = _method.toUpperCase();
    if (method.equals("GET")) {
        return new HttpGet();
    } else if (method.equals("POST")) {
        return new HttpPost();
    } else if (method.equals("HEAD")) {
        return new HttpHead();
    } else if (method.equals("TRACE")) {
        return new HttpTrace();
    } else if (method.equals("DELETE")) {
        return new HttpDelete();
    } else if (method.equals("OPTIONS")) {
        return new HttpOptions();
    } else if (method.equals("PUT")) {
        return new HttpPut();
    }//from  w  ww .  j av  a 2s. c o m
    throw newRunTimeException("Unsupported METHOD value [" + method
            + "]. Valid METHOD values are GET, POST, HEAD, TRACE, DELETE, OPTIONS and PUT.");
}