jquery.download fails to make API call which is [Authorize] restricted

六眼飞鱼酱① 提交于 2019-12-24 07:56:33

问题


I am trying to download a file using jquery.download plugin, for this I make an API call, but the issue is my API is under [Authorize] restriction, hence API call is not being made. I think it is missing Authentication header. My function is

 function ExportStS(getAll, type, print) {          
            var path = api_url + 'api/SharedDocument/GetStateSummaryExport';
            $.fileDownload(path, {
                httpMethod: "POST"               
            });
            return false;
        }

When I see the console I see this message

Failed to load resource: the server responded with a status of 401 (Unauthorized)

来源:https://stackoverflow.com/questions/41930661/jquery-download-fails-to-make-api-call-which-is-authorize-restricted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!