Я обращаюсь к запросу на стороне сервера, данные, передаваемые в запросе, очень велики, чтобы передаваться в одном запросе, поэтому в этом сценарии происходит сбой системы, поэтому следует использовать какой-либо подход для разбивки данных запроса
не смог придумать ничего, что могло бы помочь
let postpayloadnew= {
q: postPayload1.q,
reportName: this.currentReport.name,
colDefs: this.currentReport.cols
.filter(col => {
if (this.columnsNeeded == undefined) {
return col.selected;
} else if (this.columnsNeeded.includes(col.field)) {
return true;
}
return false;
})
.map(col => ({
displayName: col.displayName,
field: col.field,
cellTemplate: col.cellTemplate
})),
results: exportData,
criteria: this.FilterService.getCriteria(this.currentReport.filters)
};
на стороне клиента
this.$http.post(`../api/esr/prep`, postpayloadnew, {
timeout: this.cancelPDFPromise.promise
})
.then(response => {
window.open(`../api/esr/download/${response.data.fileName}`);
// this.totalCount = response.data.results.count;
})
.catch((err) => {
if (err.data) {
swal({
text: "Failed to download file!",
});
}
})
.finally(() => {
this.loadingPDF = false;
});
}
на стороне сервера
server.route({
path: '/api/esr/prep',
method: 'POST',
handler(req, reply) { Logic here} });