OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url/http streaming issue


Hi

Setting http headers is not support in camel-stream. You are welcome
to log a JIRA.

On Sat, Jun 9, 2018 at 1:44 AM, CASAUX Nicolas
<nicolas.casaux@xxxxxxxxxxxxxxx> wrote:
> Hello,
>
>
> I'm currently facing 2 issues related to the streaming component with URL.
>
>
> I have to use an API which is available through HTTP Server-Sent Events, with a GET method. However, to properly use this API, I have to set a custom header.
>
>
> I couldn't manage to achieve this.
>
>
> 1) using a "from(stream:url?url=http://my.api.url&scanStream=true).to()...", I could not find a way to set the specific header. I can only set some query parameters. Otherwise, the steaming functionality works as expected.
>
>
> 2) To be able to set the specific header, I tried to use a "from(timer).setHeader(...).to(stream:url?url=http://my.api.url&scanStream=true).to()..., but the streaming functionality does not work. It seems that maybe my request is streamed, but not the response. I can't get any data at all.
>
>
> Am I missing something ?
>
> Thanks in advance for your help.
>
>
> Nicolas
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2