I have a service that accepts a POST request and returns a zip file of arbitrary size. I want to send a POST request to that service from a web page and initiate a download of the response.
Since the zip file can be quite large, I need to initiate the download immediately to let the browser start writing to disk. The javscript solutions I've seen so far append the download to the document as a link, then initiate the download by clicking on the link when it's done - that won't work for me.
Is there a way to do this in javascript?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…