I am currently utilizing vuejs and sending an axios request to the server in order to download a csv file.
download() {
var that = this
//this.records = [{id: 1, name: 'Jack'}, {id: 2, name: 'Jacky'}, {id: 3, name: 'Jackie'}.....100s]
//this.header = [{value: 'id', text: 'ID'}, {value: 'name', text: 'Name'}]
var headers = this.header.map(a => a.text);
var url = USERS_REPORT_DOWNLOAD_URL + '?';
this.$axios.get(url, { params: { users: this.records, headers: headers}, responseType: 'blob' })
.then(response => {
var file = new Blob([response.data]);
FileSaver.saveAs(file, 'users ' + moment().format('MMMM Do YYYY, hh-mm a') + '.xls');
});
}
Upon calling this method, I encounter the error
HTTP Error 414 - The request URL is too long
. This issue may arise due to excessively long parameters. Any assistance in resolving this matter would be greatly appreciated.