If you want to set the query parameters, you need to set the header before
sending the request.

the HTTP method should be POST instead of  GET, as you are send the data
"mbl-stmt=(synloader(bounding-box 90 -180 -90180)(products(SYN)))".



Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem


On Thu, Sep 5, 2013 at 3:47 AM, sacauskis <msacaus...@forwardslope.com>wrote:

> I'm trying to set up a camel end point that mimics the following curl query
>
> *curl -k -u username:password -H "If-Modified-Since: Tue, 3 Sep 2013
> 18:10:00 GMT" -d "mbl-stmt=(synloader(bounding-box 90 -180 -90
> 180)(products(SYN)))" https://weather.server/server/cgi-bin/mcsrvr/server*
>
> The code I've come up with so far is:
>
> *
> from("
> https://weather.server/server/cgi-bin/mcsrvr/server/?authMethod=Basic&authUsername=username&authPassword=password
> ").
>                 setHeader(Exchange.HTTP_METHOD,constant("GET")).
>                 setHeader(Exchange.HTTP_QUERY,constant("If-Modified-Since:
> Tue, 3 Sep 2013 14:00:00 GMT")).
>
> setProperty("MBL-STMT",constant("synloader(AREA(bounding-box
> -90 -180 90 180)(report-type METAR)(products(SYN)))"))
>                    .to("file:data");*
>
> That the authentication is occurring but the query parameters are not being
> passed in.  What am I doing wrong?
>
> Any help would be greatly appreciated
>
> Mike
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/HTTP-endpoint-tp5738701.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to