Download file with a REST request needing headers and giving the content

后端 未结 4 822
甜味超标
甜味超标 2021-02-06 08:58

I am using AngularJs with a REST API. I don\'t have the hand on the REST API. I can store digital object with the API by sending a REST request. I can get it also with a GET req

4条回答
  •  梦如初夏
    2021-02-06 09:20

    Thanks everybody for helping find a solution.

    I am not able to find a satisfying solution in javascript and client side application. I am going to make a proxy class communicating with the API.

    This will send the REST request with security headers and will give as response the file content.

    This class will be called by a HTTP GET request, so the 'save as' process will be managed easily thanks to right response headers.

提交回复
热议问题