Hi,
I don't think current camel-http support the multipart/form-data out of
box, as the HttpProducer will try to turn message body into an input
stream if the http method is POST.
Please fill a JIRA for it , and you can write a processor to call the
HttpClient yourself to send this kind of message.
Willem
Nick Heudecker wrote:
I have the following route:
from("file:{{data.dir}}/query-logs/?initialDelay=600&delete=true&delay=30000")
.setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.POST))
.setHeader(Exchange.CONTENT_TYPE,
constant("multipart/form-data"))
.to("http:properties:{{license.server}}/processLog/{{server.id
}}");
The files in data.dir are ZIPs, but when they're passed to the HTTP
component, the file contents are converted into Strings, effectively
corrupting the file. How can I maintain the byte[]?
I've tested the HTTP endpoint independently and it works fine, so it's
something between reading the file and passing it to the HTTP component.
I've tried PUTs and POSTs, as well as changing out the content-type. No
change.
Thanks in advance for any suggestions.
-Nick