We have a file export module in our application, and we want to use it in the client application which uses the web api. But I can't download files with Ajax requests.
I would like to use a get query which will contains the Bearer Token as a query parameter.
Is this possible to set up in the WEB API?
In the meantime I found out the response for my question, in global asax we can have the following function which will do the work for us:
There is only one problem with the URL thing approach, we need to add the extra Authorization parameter to the action we want to invoke because we can't remove the parameter from the "Params" collection because it's read only.