Get Free Trial

How to pass additional POST parameters to export server request ?

Quentin asked on August 7, 2020

I would like to send the export to an aws bucket s3 using a pre-signed url. But I need to add parameters to the POST request sent by flexmonster.

Can we do it ?
Best regards.

2 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 14, 2020

Thank you for reaching out to us.
In order to complement the request generated by Flexmonster, the following approach can be used.
Specify the destinationType parameter of the exportTo API call with the following value: "plain". In such a case, the component’s content will be returned with callbackHandler of the exportTo method. Next, the desired POST request can be composed and sent to the server with returned data.
Please see the following code snippet for the reference:

flexmonster.exportTo("pdf", { destinationType: "plain" }, function(result) {
//sending POST request with a received data

Detailed information about the exportTo API call can be found in our documentation.
Please let us know whether the described approach works for your case.

Quentin August 28, 2020

Thank you very much for your answer.
This is exactly what I needed. I hadn’t paid attention to this option.
Best regards.

Please login or Register to Submit Answer