Thanks for the reply.  This is what the code ultimately looked like:

public class CamelHTTP {

        public static void main(String args[]) throws Exception {
                // create CamelContext
                final CamelContext context = new DefaultCamelContext();


                // add our route to the CamelContext
                context.addRoutes(new RouteBuilder() {
                        public void configure() {


                                from("direct:start")
                                .setHeader(Exchange.CONTENT_TYPE,
constant("application/x-www-form-urlencoded"))  
                                
.setHeader(Exchange.HTTP_METHOD,constant("POST"))
                                .setHeader("If-Modified-Since", constant(" Tue, 
4 Sep 2013 18:10:00
GMT"))
                                
.setBody(constant("mbl-stmt=(synloader(bounding-box 90 -180 -90
180)(report-type BBXX)(products(SYN)))"))
                        
.to("https://weather.severl/metcast/cgi-bin/mcsrvr/server?authMethod=Basic&authUsername=fusername&authPassword=password";)
                                .to("file:data");
                        }
                });

                // start the route and let it do its work
                context.start();
                ProducerTemplate template = context.createProducerTemplate();
                template.sendBody("direct:start","");

                context.setTracing(false);
                Thread.sleep(90000);

                // stop the CamelContext
                context.stop();
        }
}



--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-endpoint-tp5738701p5738805.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to