且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何向$ window.open添加身份验证头

更新时间:2022-02-05 21:12:23

我想你可以在URL中添加此认证参数,并在服务器端执行GET

I think you can add this authentication parameters in URL and do a GET in your server side

//Add authentication headers as params
var params = {
    access_token: 'An access_token',
    other_header: 'other_header'
};

//Add authentication headers in URL
var url = [url_generating_pdf, $.param(params)].join('?');

//Open window
window.open(url);