Get Free Trial

Custom HTTP header for CSV using compressor

Amandeep Singh Dhammu asked on November 6, 2017

How can we add custom header to the http call?

dataSource: {
			dataSourceType: "ocsv",
			/* URL to the Data Compressor .NET */
			filename: "http://localhost:55772/api/flexmonster/get"

In the above snippet, as flexmonster calls the URL, I need to add custom header to this URL. How can this be achieved?  
I have tried to append using following snippet, 
$(document).ajaxSend(function (event, jqxhr, settings) {
jqxhr.setRequestHeader(‘custom’, ‘new-value’)
but it doesn’t work.

1 answer

Dmytro Zvazhii Dmytro Zvazhii Flexmonster November 7, 2017

Hello Amandeep,
Thank you for your question. Please have a look at the following thread – You can find the answer to the similar question there.
Please let us know if you have any additional questions here.

Please login or Register to Submit Answer