Axios Delete request with body and headers?

后端 未结 11 2154
梦谈多话
梦谈多话 2020-11-28 08:16

I\'m using Axios while programing in ReactJS and I pretend to send a DELETE request to my server.

To do so I need the headers:

headers: {
  \'Authori         


        
11条回答
  •  广开言路
    2020-11-28 08:51

    So after a number of tries, I found it working.

    Please follow the order sequence it's very important else it won't work

    axios.delete(URL, {
      headers: {
        Authorization: authorizationToken
      },
      data: {
        source: source
      }
    });
    

提交回复
热议问题