You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by SwenVogel <sw...@ypsystems.de> on 2010/01/27 13:54:01 UTC

HTTP URI Option

Hi,

i want to receive an XML document by HTTP from an online platform.

I must use the following URL:

https://www.tyre24.de/xml_export.php?ghid=xxxx&counter=-1&password=xxxx

and the password option is part of the URL itself and must be included for
authentication. I really don't like the way the authentication is handled at
Tyre24
but i have no change to change this!

The problem is that password is also an option for the HTTP component 
for basic HTTP/NTML authentication.

Is there a way to include the password final request URL?




-- 
View this message in context: http://old.nabble.com/HTTP-URI-Option-tp27338552p27338552.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP URI Option

Posted by SwenVogel <sw...@ypsystems.de>.
Thanks for your quick help, it works =)
-- 
View this message in context: http://old.nabble.com/HTTP-URI-Option-tp27338552p27341172.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP URI Option

Posted by Willem Jiang <wi...@gmail.com>.
Please change your route like this

from("timer://foo?fixedRate=true&period=10000").setHeader(Exchange.Http_QUERY, 
constant("ghid=xxxx&password=xxxx&counter=-1").to("https://www.tyre24.de/xml_export.php")...

Willem

SwenVogel wrote:
> 
> I use the endpoint as consumer like this:
> 
> from("https://www.tyre24.de/xml_export.php?ghid=xxxx&password=xxxx&counter=-1)
> 
> but i think that the Exchange.HTTP_QUERY option has to be set before the
> endpoint
> is invoked ?!
> 
> 
> 
> willem.jiang wrote:
>> Try to use the Message header to set the query parameter.
>>
>> If you are using Camel 1.x, you can use HttpProducer.QUERY as the 
>> header's key.
>> If you are using Camel 2.x, please use Exchange.HTTP_QUERY as the 
>> header's key
>>
>> Willem
>>
>> SwenVogel wrote:
>>> Hi,
>>>
>>> i want to receive an XML document by HTTP from an online platform.
>>>
>>> I must use the following URL:
>>>
>>> https://www.tyre24.de/xml_export.php?ghid=xxxx&counter=-1&password=xxxx
>>>
>>> and the password option is part of the URL itself and must be included
>>> for
>>> authentication. I really don't like the way the authentication is handled
>>> at
>>> Tyre24
>>> but i have no change to change this!
>>>
>>> The problem is that password is also an option for the HTTP component 
>>> for basic HTTP/NTML authentication.
>>>
>>> Is there a way to include the password final request URL?
>>>
>>>
>>>
>>>
>>
>>
> 


Re: HTTP URI Option

Posted by SwenVogel <sw...@ypsystems.de>.

I use the endpoint as consumer like this:

from("https://www.tyre24.de/xml_export.php?ghid=xxxx&password=xxxx&counter=-1)

but i think that the Exchange.HTTP_QUERY option has to be set before the
endpoint
is invoked ?!



willem.jiang wrote:
> 
> Try to use the Message header to set the query parameter.
> 
> If you are using Camel 1.x, you can use HttpProducer.QUERY as the 
> header's key.
> If you are using Camel 2.x, please use Exchange.HTTP_QUERY as the 
> header's key
> 
> Willem
> 
> SwenVogel wrote:
>> Hi,
>> 
>> i want to receive an XML document by HTTP from an online platform.
>> 
>> I must use the following URL:
>> 
>> https://www.tyre24.de/xml_export.php?ghid=xxxx&counter=-1&password=xxxx
>> 
>> and the password option is part of the URL itself and must be included
>> for
>> authentication. I really don't like the way the authentication is handled
>> at
>> Tyre24
>> but i have no change to change this!
>> 
>> The problem is that password is also an option for the HTTP component 
>> for basic HTTP/NTML authentication.
>> 
>> Is there a way to include the password final request URL?
>> 
>> 
>> 
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/HTTP-URI-Option-tp27338552p27339440.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP URI Option

Posted by Willem Jiang <wi...@gmail.com>.
Try to use the Message header to set the query parameter.

If you are using Camel 1.x, you can use HttpProducer.QUERY as the 
header's key.
If you are using Camel 2.x, please use Exchange.HTTP_QUERY as the 
header's key

Willem

SwenVogel wrote:
> Hi,
> 
> i want to receive an XML document by HTTP from an online platform.
> 
> I must use the following URL:
> 
> https://www.tyre24.de/xml_export.php?ghid=xxxx&counter=-1&password=xxxx
> 
> and the password option is part of the URL itself and must be included for
> authentication. I really don't like the way the authentication is handled at
> Tyre24
> but i have no change to change this!
> 
> The problem is that password is also an option for the HTTP component 
> for basic HTTP/NTML authentication.
> 
> Is there a way to include the password final request URL?
> 
> 
> 
>