Simple download message with HTML <form method="POST">

What documentation is that? We might want to fix that.

True. The API expects a POST body (payload) to hold bare JSON, but a <form method='post'> will create a body that defines parameters with values. So that’s a dead end.

(You’re not specifying enctype, which then defaults to application/x-www-form-urlencoded. But the other option, multipart/form-data as used for file uploads, won’t help either. Also, the API probably expects Content-Type: application/json or similar.)

However, using JavaScript won’t get you any further either, as then you’ll run into the console showing something like the following:

Access to XMLHttpRequest at … from origin … has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

This cannot be fixed without an intermediate server either; see How to send downlink to HTTP Integration from jQuery? - #9 by arjanvanb

1 Like