📜  在 js 中获取 api - Javascript 代码示例

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

代码示例6
async function fetchText() {
    let response = await fetch('/readme.txt');
    let data = await response.text();
    console.log(data);
}Code language: JavaScript (javascript)