Javascript – Download file when button clicked POST request
How do I trigger a file download when a button is clicked? For testing sake, when making a GET request using <Link href="/api/generate-pdf"/> it works fine and the pdf file is saved. With the button the api is hit but…