I'm trying to to trigger pregenerated URL to export CSV as follow:
// call API for CSV export
$( ".buttons-csv" ).click(function(e) {
var csvURL = csvAPI(dlog);
$.get( csvURL, function( data ) {
alert( "Export was performed." );
});
});
problem is that will not call created csvURL URL to download a file.
I have tried to get it done via
window.location.href = csvURL
but that wasn't work either.
csvAPIand looks likehttp://domain/logs?startdate=2019-05-30&enddate=2019-05-30&filter=string&filter_status=test&_format=csv