Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15412

camel-box - No way to set OutputStream option

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • 3.4.2
    • None
    • camel-box
    • None
    • Unknown

    Description

      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:

      from("timer:test?period=3600")
          .setHeader("CamelBox.fileId", constant("12345678")
          .setHeader("CamelBox.output", new ByteArrayOutputStream())
          .to("box://files/download")
          .to("file://out");
      

      Using Camel thinking, I tried this code first but I understand if this component wants to be special with its headers and stuff.

      from("timer:test?period=3600")
         .to("box://files/download?fileId=123456789") 
         .to("file://out");  
      

      Again, please let me know what I can do to help.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mgenereu Michael Genereux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: