Hello,

Are you using the http component?

http://camel.apache.org/http.html

There is a section on authentication there.

Example:

from("http://examples.com/rest/hello?";
                + "authMethod=Basic"
                + "&authUsername=User"
                + "&authPassword=Password")
                .to("mock:answer");


On Thu, Oct 1, 2015 at 1:29 PM, zied123456 <zied.i...@gmail.com> wrote:

> Hello,
> I try to send request to a webservice with camel and i dont found how to
> set
> httplogin and httppass with
> POJO i can do this:
>
> final String s =  my_httpLogin+":"+my_httpPwd;
> final byte[] authBytes = s.getBytes(StandardCharsets.UTF_8);
> final String encoded = Base64.getEncoder().encodeToString(authBytes);
>
> and i set it in the header like this:
>
> con.setRequestProperty("Authorization", "Basic " + encoded);
>
> How can i do this with Camel Route ?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5742229p5772150.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Kind regards
Joakim Bjørnstad

Reply via email to