You don't need to set the pattern to InOut. InOnly which is the default is
enough for this case. You can use http4 to do http requests. If you want to
receive http use jetty, netty or some other http component. It is stated in
the documentation.

On Wed, Mar 1, 2017 at 2:36 PM, rkmohapatra [via Camel] <
ml-node+s465427n5794629...@n5.nabble.com> wrote:

> Hi Souciance and all,
>
> With this code, it worked this time with http4.
> Used ExchangePattern.InOut.
>
> from("file:d:\\testcamel").convertBodyTo(String.class)
>                 .setExchangePattern(ExchangePattern.InOut)
>                 .setHeader(Exchange.HTTP_PATH, constant("/path"))
>                 .setHeader(Exchange.HTTP_QUERY, constant("q=xyz"))
>                 .to("http4://host:port/ctxroot")
>       .convertBodyTo(String.class)
>       .log("Google responded with body:\n${body}")
>       .to("mock:result").process(new MyProcessor());
>
> I can see processor getting invoked and I can get the HTTP response body
> there.
>
> Thanks a lot for the help. I am more clear on the concepts now.
>
> Just wanted to clarify I can even use jetty or netty4-http for such
> requirement, right?
> Where can I find details of the component wise dependencies on 3rd-party
> jars with correct versions?
>
> Regards,
> Rajesh
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Consuming-data-from-
> external-REST-service-tp5794514p5794629.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Consuming-data-from-external-REST-service-tp5794514p5794631.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to