[removed] Fetch DELETE and PUT requests

前端 未结 7 2030
一个人的身影
一个人的身影 2020-12-01 04:26

I have gotten outside of GET and POST methods with Fetch. But I couldn\'t find any good DELETE and PUT example.

So, I ask you for it. Could you give a good example

相关标签:
7条回答
  • 2020-12-01 05:01

    Just Simple Answer. FETCH DELETE

    function deleteData(item, url) {
      return fetch(url + '/' + item, {
        method: 'delete'
      })
      .then(response => response.json());
    }
    
    0 讨论(0)
提交回复
热议问题