As a newcomer to EXTJS4.2 and web development, I have been trying to understand a particular issue that has left me confused.
In my AJAX code, I am calling a REST API using POST with JSON input parameters in order to download a PDF file.
Some sources claim that it is not possible to use AJAX for downloading PDF files, while others suggest utilizing AJAX with submit form parameters through an IFRAME.
I have attempted various solutions without success, so I am seeking clarification on what can be achieved and how to go about it. Is it feasible to write the responseText to a file?
My goal is to find a cross-browser solution that leverages EXTJS capabilities.
To provide some context, here is an example of the response content type:
Transfer-Encoding: chunked
Content-Type: application/pdf;charset=utf-8
Content-Disposition: attachment;filename=1428140714.pdf