How to send binary data in invokeurl task?
Hello,
I am using Adobe's Protect PDF API.
cURL in Postman:
--header 'Content-Type: application/pdf' \
--data-binary '@postman-cloud:///1efc4376-bad2-4750-ace1-16715a7e932b'
You can see here that data is passed as binary. Basically the file is being sent like that:

Deluge:
- a = invokeurl
- [
- url :"https://pdfobject.com/pdf/sample.pdf"
- type :GET
- ];
- a=a.getFileContent();
- header_map.put("Content-Type","application/pdf");
- upload_file = invokeurl
- [
- url :uploadUri
- type :PUT
- parameters:a
- headers:header_map
- detailed:true
- ];
-
- a=a.getFileContent();
However I suppose in Deluge it is sending an empty file.
I have used sendmail to see what the variable a is. I can see the PDF without any issues in the email.
But for some reason it's not working in the API call
How can I fix that?