Thank you for your response.
I want to send a XML from workflow to a server (REST-API).
If I send the XML file base64 encoded with header “multipart/form-data” I get an error from the REST-API server.
Actually I can manage the request through curl request (VBS WScript.shell command line execution) in workflow. But in curl I do not get the response properly. As response I get nothing (
.exec()) or 0 (
.run()). But on the target server I can see that my request was successfully sent.
My curl command:
var xml_file = '"/C:/PLANETPRESS/myFile.xml"';
"curl --location 'http://xxx.xxx.xxx.xx/backendserver/restapi/upload' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Authorization: Bearer "+token+"' --form '" + xml_file + "'"
So I would really prefer a JS solution in workflow script to check if the request was successfully send.
Edit: It seems, that the curl request does not work as expected. So I need another approach.