[
https://issues.apache.org/jira/browse/NIFI-3620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17637755#comment-17637755
]
Luigi De Giovanni commented on NIFI-3620:
-----------------------------------------
Hi,
it would be great if this could be fixed.
I have experienced the same issue recently and I managed to work around it.
I am pasting below some info I shared on the slack channel.
"I am dealing with an API which takes only POST requests and needs parameters
passed in the body, as multipart/form-data .The InvokeHTTP processor doesn't
work - with the API I am dealing with - if I define the request parameters as
additional properties, like post:form:<name>.
This is because the form-data is attached by the processor to the URL.
However, since the InvokeHTTP processor takes the contents of the input
FlowFile as request body, I worked around that by creating the
multipart/form-data text in a GenerateFlowFile or ReplaceText processor, with
proper mime type and boundary.
Passing this to the InvokeHTTP without custom attributes makes that API react
correctly."
The trick is basically in formatting the text of the body as an actual
multipart/form mime type.
I reproduced it by checking the standard specification for multipart/form-data
available publicly.
It would be great if the processor was able to do this formatting by itself.
Also, multipart/form-data shouldn't be attached to the URL, but remain in the
request body only.
For any question, feel free
> InvokeHttp should be able to send multipart forms
> -------------------------------------------------
>
> Key: NIFI-3620
> URL: https://issues.apache.org/jira/browse/NIFI-3620
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Andre F de Miranda
> Assignee: Andre F de Miranda
> Priority: Major
>
> Currently InvokeHTTP is unable to send multipart forms, meaning it cannot be
> used to a number of REST APIs endpoints.
> This has been identified by users
> https://lists.apache.org/thread.html/32654510792f62ab855a785265c5ad5747cc0490da225fd2d44ac10a@%3Cdev.nifi.apache.org%3E
--
This message was sent by Atlassian Jira
(v8.20.10#820010)