You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michael Genereux (Jira)" <ji...@apache.org> on 2020/08/14 04:22:00 UTC
[jira] [Created] (CAMEL-15412) No way to set OutputStream option
Michael Genereux created CAMEL-15412:
----------------------------------------
Summary: No way to set OutputStream option
Key: CAMEL-15412
URL: https://issues.apache.org/jira/browse/CAMEL-15412
Project: Camel
Issue Type: Bug
Components: camel-box
Affects Versions: 3.4.2
Reporter: Michael Genereux
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.3.4#803005)