I'm trying to download binary data using a Web API Controller, using JQuery.get().
The code I tried is:
$.get("../api/Download/Report?Id=" + selectedItem.Id);
which transforms into an HTTP GET with this URL when I debug the running app:
http://localhost:12150/api/Download/Report?Id=2515
The browser shows 200 as result, receiving the binary data, but it does not open it nor offers to download the file. If I copy and paste the URL in the address bar and press 'Enter', it works.
Any suggestions or alternatives that allow relative paths?