Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to implement invoke Http post request for post pdf

how to implement invoke Http post request for post pdf

New Contributor

NiFi doesn't seem to take -F as an input while invoking the following request:


`curl -X POST "http://ipaddress:port/api/" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "pdf_file=@sample.pdf;type=application/pdf"`

It seems to me that it is by default requesting in this format:


`curl -X POST "http://ipaddress:port/api/" -H "accept: application/json" -H "Content-Type: multipart/form-data" -d "pdf_file=@sample.pdf;type=application/pdf"`

Sending raw data instead of form data.



The API hence responds with error saying:

"400 Bad Request: The browser (or proxy) sent a request that this server could not understand."