Need a special offer?Find out if your project fits.
+

How to pass additional POST parameters to export server request ?

Answered
Quentin asked on August 7, 2020

Hello,
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

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 14, 2020

Hello,
 
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.
 
Regards,
Illia

Public
Quentin August 28, 2020

Hello,
Thank you very much for your answer.
This is exactly what I needed. I hadn't paid attention to this option.
 
Thanks.
 
Best regards.
Quentin

Please login or Register to Submit Answer