有人可以向我解释为什么这段代码不会在Edge上产生http请求吗?https://jsfiddle.net/sectioni/tyr5fLgc/1/
let url = "/test.aspx";
// don't change this to a const because the append will not work in Edge
let data = new URLSearchParams();
data.append("userPreferences", "bla");
let promise = fetch(url, {
method: "POST", // POST, PUT, DELETE, etc.
body: data,
cache: "no-cache", // no-store, reload, no-cache, force-cache, or only-if-cached
keepalive: true
});
它确实适用于Chrome和Firefox,如果您删除身体部分,请求将在Edge上发送。
慕的地6264312
相关分类