Can I control the HTTP headers sent by window.open
(cross browser)?
如果没有的话,我可以选择<代码>window. open。 a page that when issues my request with Customs Headers within its poppedup即?
I need some cunning hacks.
Can I control the HTTP headers sent by window.open
(cross browser)?
如果没有的话,我可以选择<代码>window. open。 a page that when issues my request with Customs Headers within its poppedup即?
I need some cunning hacks.
我能否控制通过窗口(交叉浏览器)发送的吉大港游轮头?
无
否则,我就能够 window窗。 开放一页,然后在播种窗口内向海关负责人提出我的要求?
我需要一些避风港。
It might help if you described the problem instead of asking if possible solutions would work.
可悲的是,在窗口时,你可以控制头盔。
尼斯和简便,我如何设法向海关负责人开放档案:
const viewFile = async (url) => {
// Change this to use your HTTP client
fetch(url, {/*YOUR CUSTOM HEADER*/} ) // FETCH BLOB FROM IT
.then((response) => response.blob())
.then((blob) => { // RETRIEVE THE BLOB AND CREATE LOCAL URL
var _url = window.URL.createObjectURL(blob);
window.open(_url, "_blank").focus(); // window.open + focus
}).catch((err) => {
console.log(err);
});
};
If you are in control of server side, it might be possible to set header value in query string and send it like that? That way you could parse it from query string if it s not found in the headers.
只是一个想法...... 你们要求有一个ning车:
由于最佳宇航员使用<代码>XMLHttpResponse书写,但window. open/code>除外,因此,我将摘要-anwser作为实例。
主要Js文档是download.js
Download-JS。
// var download_url = window.BASE_URL+ "/waf/p1/download_rules";
var download_url = window.BASE_URL+ "/waf/p1/download_logs_by_dt";
function download33() {
var sender_data = {"start_time":"2018-10-9", "end_time":"2018-10-17"};
var x=new XMLHttpRequest();
x.open("POST", download_url, true);
x.setRequestHeader("Content-type","application/json");
// x.setRequestHeader("Access-Control-Allow-Origin", "*");
x.setRequestHeader("Authorization", "JWT " + localStorage.token );
x.responseType = blob ;
x.onload=function(e){download(x.response, "test211.zip", "application/zip" ); }
x.send( JSON.stringify(sender_data) ); // post-data
}
您也可使用F5载荷平衡器,并绘制你试图在原籍地内穿透URL的交叉浏览器图。
测绘可以像:
companyA.com/api/of/interest----> companyB.com/api/of/interest
假设你的原产地是“公司”,那么浏览器在发出这一请求时不会遇到任何问题,因为它向同一领域倾斜。
这项请求击中了负荷平衡器,并提交给了所有头盔回复的“公司B.com”,将送交服务器一侧。
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...
I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...
Is it possible for someone to give me a few pointers on how to display a multidimensional array in the form of a bar graph? The array is multidimensional, with three elements in each part - and the ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.