📜  javascript 获取响应负载 - Javascript 代码示例

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

代码示例1
try {
  const response = await fetch(url, {
          method: "PUT",
        });

   if (response.ok) {
     const data = await response.text();
   }
} catch (e) {
 console.log(e) 
}