Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpTrace


      case POST:
        return new HttpPost(uri);
      case PUT:
        return new HttpPut(uri);
      case TRACE:
        return new HttpTrace(uri);
      case PATCH:
        return new HttpPatch(uri);
      default:
        throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod);
    }
View Full Code Here


            } else if (method.equals(HTTPConstants.PUT)) {
                httpRequest = new HttpPut(uri);
            } else if (method.equals(HTTPConstants.HEAD)) {
                httpRequest = new HttpHead(uri);
            } else if (method.equals(HTTPConstants.TRACE)) {
                httpRequest = new HttpTrace(uri);
            } else if (method.equals(HTTPConstants.OPTIONS)) {
                httpRequest = new HttpOptions(uri);
            } else if (method.equals(HTTPConstants.DELETE)) {
                httpRequest = new HttpDelete(uri);
            } else if (method.equals(HTTPConstants.GET)) {
View Full Code Here

    } else if(method.equals("POST")) {
      return new HttpPost(uri);
    } else if(method.equals("DELETE")) {
      return new HttpDelete(uri);
    } else if(method.equals("TRACE")) {
      return new HttpTrace(uri);
    } else if(method.equals("OPTIONS")) {
      return new HttpOptions(uri);
    } else if(method.equals("HEAD")) {
      return new HttpHead(uri);
    }
View Full Code Here

    }

    @Test
    public void testDoNotFlushCacheEntriesOnTrace() throws Exception {
        final HttpHost host = new HttpHost("foo.example.com");
        final HttpRequest req = new HttpTrace("/bar");
        final String key = (new CacheKeyGenerator()).getURI(host, req);
        final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry();

        backing.map.put(key, entry);
View Full Code Here

        final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1,
                HttpStatus.SC_TEMPORARY_REDIRECT, "Temporary Redirect");
        response.addHeader("Location", "http://localhost/stuff");
        final HttpContext context1 = new BasicHttpContext();
        final HttpUriRequest redirect1 = redirectStrategy.getRedirect(
                new HttpTrace("http://localhost/"), response, context1);
        Assert.assertEquals("TRACE", redirect1.getMethod());
        final HttpContext context2 = new BasicHttpContext();
        final HttpPost httppost = new HttpPost("http://localhost/");
        final HttpEntity entity = new BasicHttpEntity();
        httppost.setEntity(entity);
View Full Code Here

    public static Request Put(final String uri) {
        return new Request(new HttpPut(uri));
    }

    public static Request Trace(final URI uri) {
        return new Request(new HttpTrace(uri));
    }
View Full Code Here

    public static Request Trace(final URI uri) {
        return new Request(new HttpTrace(uri));
    }

    public static Request Trace(final String uri) {
        return new Request(new HttpTrace(uri));
    }
View Full Code Here

    }

    @Test
    public void testDoNotFlushCacheEntriesOnTrace() throws Exception {
        final HttpHost host = new HttpHost("foo.example.com");
        final HttpRequest req = new HttpTrace("/bar");
        final String key = (new CacheKeyGenerator()).getURI(host, req);
        final HttpCacheEntry entry = HttpTestUtils.makeCacheEntry();

        backing.map.put(key, entry);
View Full Code Here

TOP

Related Classes of org.apache.http.client.methods.HttpTrace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.