Package org.apache.camel.component.http4

Examples of org.apache.camel.component.http4.HttpComponent


    private String user = "camel";
    private String password = "password";

    @Test
    public void httpsGetWithAuthentication() throws Exception {
        localServer.register("/", new AuthenticationValidationHandler("GET", null, null, getExpectedContent(), user, password));

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


        return httpproc;
    }

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

        return registry;
    }

    @Test
    public void httpsGetWithAuthentication() throws Exception {
        localServer.register("/", new AuthenticationValidationHandler("GET", null, null, getExpectedContent(), user, password));

        Exchange exchange = template.request("https4://127.0.0.1:" + getPort() + "/?authUsername=camel&authPassword=password&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("/", new BasicValidationHandler("GET", "hl=en&q=camel", null, getExpectedContent()));
        server.register("/test/", new BasicValidationHandler("GET", "my=@+camel", null, getExpectedContent()));
    }
View Full Code Here

        assertExchange(exchange);
    }

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

*/
public class HttpsGetTest extends BaseHttpsTest {

    @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/", 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()));
    }
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

*/
public class HttpProducerSelectMethodTest extends BaseHttpTest {

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

        HttpComponent component = context.getComponent("http4", HttpComponent.class);
       
        HttpEndpoint endpoiont = (HttpEndpoint) component.createEndpoint("http4://" + getHostName() + ":" + getPort());
        HttpProducer producer = new HttpProducer(endpoiont);
View Full Code Here

        assertExchange(exchange);
    }

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

        HttpComponent component = context.getComponent("http4", HttpComponent.class);

        HttpEndpoint endpoiont = (HttpEndpoint) component.createEndpoint("http4://" + getHostName() + ":" + getPort());
        HttpProducer producer = new HttpProducer(endpoiont);
View Full Code Here

TOP

Related Classes of org.apache.camel.component.http4.HttpComponent

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.