I have an SOE that creates a pdf and streams it back in the response and it works great. Now how can I call it using dojo or the esriRequest object to call the SOE and display the resulting pdf in a new window? I see the esriRequest has a handleAs that can be set to document, but I fail to see how it is implemented. I have seen examples of using dojo.io.iframe, but I prefer not to use a deprecated library.
var downloadPdfIframeName = "downloadPdfIframe";
var iframe = dojo.io.iframe.create(downloadPdfIframeName);
dojo.io.iframe.setSrc(iframe, url, true);
Any help piecing it together would be appreciated.