0

I have an input stream payload with data from a file. The file can be very big. I'm sending the input stream to an http/https outbound endpoint. However, I'd like to also send metadata with the contents of the file, such as the file name and possibly other key/pair values in the post request.

If I have an input stream, and also a few strings which I want to send as a single post data, what would I need to do with Mule on the payload in order to have them all sent properly?

Loic Duros
  • 5,472
  • 10
  • 43
  • 56

1 Answers1

1

Basically what you want is to have inbound properties available as outbound so that they are send along with the message payload.

You may copy individual property if you just care about some like

 <set-property propertyName="originalFilename"  value="#[message.inboundProperties.originalFilename]"/>

or you could copy all of them at once like

<copy-properties propertyName="http.*" doc:name="Copy All HTTP Headers"/>

You can do this before calling http outbound endpoint

Charu Khurana
  • 4,511
  • 8
  • 47
  • 81