You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/02 15:54:00 UTC

[jira] [Resolved] (CAMEL-15412) camel-box - No way to set OutputStream option

     [ https://issues.apache.org/jira/browse/CAMEL-15412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-15412.
---------------------------------
    Resolution: Not A Bug

> camel-box - No way to set OutputStream option
> ---------------------------------------------
>
>                 Key: CAMEL-15412
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15412
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-box
>    Affects Versions: 3.4.2
>            Reporter: Michael Genereux
>            Priority: Major
>
> I want to download a file from Box and the setHeader doesn't accept objects when setting the header.  The required output parameter is a OutputStream. The integration tests use the component directly as opposed to the URLs or setHeader methods. I would have expected the outputstream payload to be in the Message coming out of the endpoint.  The REST component documentation looks more like what I was expecting.
> My variation of the example from the docs that doesn't work:
> {code:java}
> from("timer:test?period=3600")
>     .setHeader("CamelBox.fileId", constant("12345678")
>     .setHeader("CamelBox.output", new ByteArrayOutputStream())
>     .to("box://files/download")
>     .to("file://out");
> {code}
> Using Camel thinking, I tried this code first but I understand if this component wants to be special with its headers and stuff.
> {code:java}
> from("timer:test?period=3600")
>    .to("box://files/download?fileId=123456789") 
>    .to("file://out");  
> {code}
> Again, please let me know what I can do to help.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)