ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 自定义请求 Request ``` const myHeaders = new Headers(); const myRequest = new Request('flowers.jpg', { method: 'GET', headers: myHeaders, // 添加自定义请求头 mode: 'cors', cache: 'default', }); fetch(myRequest) .then(response => response.blob()) .then(myBlob => { myImage.src = URL.createObjectURL(myBlob); }); ```