📜  补丁请求 javascript 代码示例

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

代码示例1
const PATCH = (id) => {
    fetch(`Your link here/${id}`, {
      //requires an id to patch
      method: `PATCH`,
      body: JSON.stringify({
        //your data here
      }),
      headers: { 'Content-type': `application/json; charset=UTF-8` },
    }).then((response) => response.json())
  }