title: How to make HTTP Patch request to raven db server using golang?
body: <p>I have written the following code to add a title field to the document 1 in my raven database.</p>
  
  <pre><code>url := "http://localhost:8083/databases/drone/docs/1"
  fmt.Println("URL:&gt;", url)
  
  var jsonStr = []byte(`{"title":"Buy cheese and bread for breakfast."}`)
  req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(jsonStr))
  req.Header.Set("X-Custom-Header", "myvalue")
  req.Header.Set("Content-Type", "application/json")
  
  client := &amp;http.Client{}
  resp, err := client.Do(req)
  if err != nil {
      panic(err)
  }
  defer resp.Body.Close()
  
  body, _ := ioutil.ReadAll(resp.Body)
  fmt.Println("response Body:", string(body))
  </code></pre>
  
  <p>I don't understand why it is not working? I am getting the following response Body which is not what I am expecting. I am expecting a success response.</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
      &lt;h1&gt;Could not figure out what to do&lt;/h1&gt;
      &lt;p&gt;Your request didn't match anything that Raven knows to do, sorry...&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Can someone please point out what am I missing in the above code?</p>