I used to use this code to download resources:
<a href='http://example.com' download> Download </a>
Where example.com is another website (cross origin).
But this is not working now , I tried Chrome - Opera - Mozilla and even Internet Explorer , But it's not working.
See https://caniuse.com/#search=download ("Known Issues" Tab) where it says:
Firefox only supports same-origin download links.
Chrome 65 and above only supports same-origin download links.
IE does not support the download-attribute at all
I figured out a workaround for downloading images cross-origin. You may be able to modify this to work with other media types. Hope this helps
Force browser to download image files on click
All major browsers have implemented this as a security guard for the user.
In addition it is stated in the HTML spec
(link to chrome feature)