Package org.apache.camel.component.http4.helper

Examples of org.apache.camel.component.http4.helper.CamelFileDataSource


        assertExchange(exchange);
    }

    @Test
    public void withMethodPostInHeader() 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


        producer.stop();
    }

    @Test
    public void withMethodGetInHeader() 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

        producer.stop();
    }

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

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

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

        producer.stop();
    }

    @Test
    public void withQueryInHeader() throws Exception {
        localServer.register("/", new BasicValidationHandler("GET", "q=Camel", 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

        producer.stop();
    }
   
    @Test
    public void withHttpURIInHeader() throws Exception {
        localServer.register("/", new BasicValidationHandler("GET", "q=Camel", 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

        producer.stop();
    }

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

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

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

        assertExchange(exchange);
    }

    @Override
    protected void registerHandler(LocalTestServer server) {
        server.register("/", new BasicValidationHandler("GET", null, null, getExpectedContent()));
    }
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()));
        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

TOP

Related Classes of org.apache.camel.component.http4.helper.CamelFileDataSource

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.