if I use "rbv_api.sendJSONRequest(url, null, "GET", contentType, username, password, headers)" to download a pdf- file, the top of the responsebody(file) looks like:
%PDF-1.4 %����� 1 0 obj
This is similar to filedate when using "rbv_api.getTextData"
I want to download the pdf as a binary-file, similar to "rbv_api.getBinaryData"
I have tried with a lots of content-types in the JSO Request but I do not get any changes in the response.
Can someone tell me wich content-type I should use?
Hello,
What content type did you already use? Did you try using "application/pdf" as the content type?
Thank you,
Gian
Yes, I have tried this.
Hello,
Are you accessing a public URL? Can you provide this for testing? Did you also add any HTTP header parameters to the API like header('Content-Transfer-Encoding: binary') but in a name/value format?
Thank you,
Gian
This is an "Public" URL but I need to show you a private bearer as a part of the header.
I can send this direct to you for testing. (Where can I send it?)
And yes, I add http headers for content-type (application/pdf).
Here is the answer from Egnyte (Where I download from):
"
The Content-Type header is not your issue.
It looks like you are getting the binary content of the file but that it is being output to standard I/O. If you are using a curl command, try adding the -O flag.
For example:
curl -O -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxx" 'smartsys.egnyte.com/.../FAKT-701906.pdf&
"
Hi Stein,
Let me communicate this to the team whether it is possible to get the binary of the file using rbv_api.sendJSONRequest(), and will try to get alternative way.
Regards,
Orchid
Hi Stein,
Can you send me the test URL for testing through my email: ocorpin@progress.com
Thanks,
Orchid
Was there ever a response to this?
This was not supported.
I have put this under the Idea-section: