Hi! i'm working with the pdf viewer and i has a use case that needs intercept a response header at load document.
Why i need it?: I has a form, with the values i call the api service pdfviewer load to get a pdf from the values. The issue is that i dont have the filename generated by backend (and i need it to download), so backend can send me in response header the file name in content-disposition or other header.
So i need intercept the response header of load pdf. How i can do this?
Hi Vasugi, yes, i'm ok with autorization header and works fine. In my case, i need intercept Response Header, not Request Header.
I need intercept Response Header because in one of them backend send to me important info.
public ajaxInitiate(e: AjaxRequestInitiateEventArgs): void {
if (e.JsonData.action == "Load") {
e.JsonData["id"] = "PDFViewer";
var pdfviewer = (<any>document.getElementById("pdfViewer"))
.ej2_instances[0];
pdfviewer.setJsonData(e.JsonData);
}
} |