title: Axios - DELETE Request With Request Body and Headers?
body: <p>I'm using Axios while programing in ReactJS and I pretend to send a DELETE request to my server.</p>
  
  <p>To do so I need the headers:</p>
  
  <pre><code>headers: {
    'Authorization': ...
  }
  </code></pre>
  
  <p>and the body is composed of</p>
  
  <pre><code>var payload = {
      "username": ..
  }
  </code></pre>
  
  <p>I've been searching in the inter webs and only found that the DELETE method requires a "param" and accepts no "data".</p>
  
  <p>I've been trying to send it like so:</p>
  
  <pre><code>axios.delete(URL, payload, header);
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>axios.delete(URL, {params: payload}, header);
  </code></pre>
  
  <p>But nothing seems to work...</p>
  
  <p>Can someone tell me if its possible (I presume it is) to send a DELETE request with both headers and body and how to do so ?</p>
  
  <p>Thank you in advance!</p>