I need to post a large amount of data to a URL (say /generate-pdf) via ajax. The server returns the generated report in pdf format(not a file but a stream). How can I open a new window to show the content. For a GET request, it's as easy as doing the following:
<a href="/generate-pdf?from=xxxx-xx-xx&to=yyyy-yy-yy" target="_blank" >Report from x to y</a>
But I need to do a POST because of the size of the data being sent to the server. Thanks.