🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all hot features!
Get Free Trial

Request headers CSV without compressor

Davide Malagoli asked on May 8, 2019

I do not understand if there’s an option to pass a custom header for every request made by flexmonster using a CSV/JSON datasource.
For example I need to pass and header ‘auth-token’ with a authentication token.
Is this possible?
Thank you,

2 answers

Vera Didenko Vera Didenko Flexmonster May 9, 2019

Hello, Davide,
Thank you for your question.
Yes, it is possible to pass a custom header for CSV/JSON data sources in Flexmonster.
This is done via the requestHeader parameter in the dataSource object:

dataSource: {
requestHeader: {
'Authorization':"znati 21521512454"

Here is a JSFiddle example for illustration.
The requestHeader consists of “key”: “value” pairs, where “key” is a header name and “value” is its value.
An important remark is that the requestHeader is not saved when obtaining the report via save() and getReport() API calls.
Please let us know if this works.
Best Regards,

Davide Malagoli May 13, 2019

thanks, it works!

Please login or Register to Submit Answer