I have a route /reports/foo-report/rendered/
which will return a file download (Using the Content-Disposition
header). As recommended by REST, whether the report is returned as a pdf or powerpoint depends on the request's Accept
header.
What are my options for setting this header when triggering a file download? I obviously cannot use XmlHttpRequest
, a link, or a form. I'm currently using the awesome jquery.fileDownload but it doesn't seem to support this either.
Is there any way to do this in a proper RESTy fashion in browsers?