Package org.apache.camel.component.http4.handler

Examples of org.apache.camel.component.http4.handler.BasicValidationHandler


        assertExchange(exchange);
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/", new BasicValidationHandler("GET", "hl=en&q=camel", null, getExpectedContent()));
        server.register("/test/", new BasicValidationHandler("GET", "my=@+camel", null, getExpectedContent()));
        server.register("/user/pass", new BasicValidationHandler("GET", "password=baa&username=foo", null, getExpectedContent()));
    }
View Full Code Here


    @Test
    public void httpHandleRedirect() throws Exception {
        // force a 301 redirect
        localServer.register("/test", new RedirectHandler(HttpStatus.SC_MOVED_PERMANENTLY));
        localServer.register("/someplaceelse", new BasicValidationHandler("GET", null, null, "Bye World"));

        String uri = "http4://" + getHostName() + ":" + getPort()
                + "/test?httpClient.soTimeout=60000&httpClient.connectionTimeout=60000"
                + "&httpClient.staleCheckingEnabled=false";
        Exchange out = template.request(uri, new Processor() {
View Full Code Here

*/
public class HttpWithHttpUriHeaderTest extends BaseHttpTest {

    @Test
    public void notBridgeEndpointWithDefault() throws Exception {
        localServer.register("/", new BasicValidationHandler("GET", null, null, getExpectedContent()));

        Exchange exchange = template.request("http4://host/", new Processor() {
            public void process(Exchange exchange) throws Exception {
                exchange.getIn().setHeader(Exchange.HTTP_URI, "http4://" + getHostName() + ":" + getPort() + "/");
            }
View Full Code Here

        assertExchange(exchange);
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/", new BasicValidationHandler("POST", null, getBody(), getExpectedContent()));
    }
View Full Code Here

        return registry;
    }

    @Test
    public void httpsGet() throws Exception {
        localServer.register("/mail/", new BasicValidationHandler("GET", null, null, getExpectedContent()));

        Exchange exchange = template.request("https4://127.0.0.1:" + getPort() + "/mail/?x509HostnameVerifier=x509HostnameVerifier", new Processor() {
            public void process(Exchange exchange) throws Exception {
            }
        });
View Full Code Here

        assertExchange(exchange);
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/search", new BasicValidationHandler("GET", null, null, getExpectedContent()));
        server.register("/test%20/path", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
View Full Code Here

        assertEquals(4, exchange.getIn().getHeader(Exchange.REDELIVERY_COUNTER));
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/search", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
View Full Code Here

        return true;
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/search", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
View Full Code Here

        assertIsInstanceOf(ConnectException.class, cause.getCause());
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/search", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
View Full Code Here

        assertEquals(501, cause.getStatusCode());
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.http4.handler.BasicValidationHandler

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.