📜  设置自定义用户代理反应 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:53.988000             🧑  作者: Mango

代码示例1
let headers = new Headers({
    "Accept"       : "application/json",
    "Content-Type" : "application/json",
    "User-Agent"   : "MY-UA-STRING"
});

fetch(url, {
    method  : 'GET', 
    headers : headers 
    // ... etc
}).then( ...