title: golang parse POST request
body: <p>I have a HTTP POST request with payload</p>
  
  <pre><code>indices=0%2C1%2C2
  </code></pre>
  
  <p>Here is my golang backend code</p>
  
  <pre><code>err := r.ParseForm()
  if err != nil {
      http.Error(w, err.Error(), http.StatusInternalServerError)
      return
  }
  log.Println("r.PostForm", r.PostForm)
  log.Println("r.Form", r.Form)
  
  body, err := ioutil.ReadAll(r.Body)
  if err != nil {
      http.Error(w, err.Error(), http.StatusInternalServerError)
      return
  }
  log.Println("r.Body", string(body))
  
  values, err := url.ParseQuery(string(body))
  if err != nil {
      http.Error(w, err.Error(), http.StatusInternalServerError)
      return
  }
  log.Println("indices from body", values.Get("indices"))
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>r.PostForm map[]
  r.Form map[]
  r.Body indices=0%2C1%2C2
  indices from body 0,1,2
  </code></pre>
  
  <p>Why is it that the POST request is not parsed by <code>r.ParseForm()</code>, while manaully parsing it with <code>url.ParseQuery(string(body))</code> gives the correct result?</p>