title: Body of delete request is empty in my rest api endpoint
body: <p>I seem to get empty body content of a Go http.Request if the method is DELETE.  But if I change the method to POST, then the body content gives me the content I expect.</p>
  
  <p>The relevant code from my golang looks like this:</p>
  
  <pre><code>import(
    "github.com/gorilla/handlers"
    "github.com/gorilla/mux"
  )
  func Delete(w http.ResponseWriter, r *http.Request) {
    r.ParseForm()
    qs := r.Form
    log.Println(qs)
  }
  
  
  func main() {
    router := mux.NewRouter()
  
    router.HandleFunc("/profile", Delete).Methods("POST")
    router.HandleFunc("/profile", Delete).Methods("DELETE")
  
  }
  </code></pre>
  
  <p>Now when I run this JavaScript code form my browser:</p>
  
  <pre><code>fetch(sendurl,{
    method:"POST",
    headers:{
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    body:"data="+project.encodeFormURIComponent(JSON.stringify({"ids":[1032,1033]}))
  })
  .then(response=&gt;{
    if(response.ok)
      return response.json();
  })
  .then(result=&gt;{
    console.log(result);
  })
  </code></pre>
  
  <p>I see a nice array of numbers in my <code>qs[ids]</code> in my Golang code.  But if I change my <code>method:"POST"</code> to <code>method:"DELETE"</code> in the JavaScript, then <code>qs</code> is empty.</p>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This JavaScript with the DELETE method can populate the Go <code>qs</code> variable the way one would normally expect:</p>
  
  <pre><code>fetch(sendurl+"?data="+project.encodeFormURIComponent(JSON.stringify({"ids":[1032,1033]})),{
    method:"DELETE",
    headers:{
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
  .then(response=&gt;{
    if(response.ok)
      return response.json();
  })
  .then(result=&gt;{
    console.log(result);
  })
  </code></pre>
  
  <p>So it seems Go will ignore JavaScript <code>body</code> argument when <code>DELETE</code> method is used, but it will respect the query string content in the API endpoint url? Why is it like that?</p>