title: NodeJS: How to use html form to send PATCH & DELETE request
body: <p>I have an API and i should send PATCH request if i need to update the object; the problem is that when i send the PATCH request the body is always undefined.</p>
  
  <p>this how i send PATCH request Ex.</p>
  
  <pre><code>   app.patch('/applications/update/:application_id', function(request, response) {
              var application_id = request.params.application_id;
              require('../../models/applications/update_application_by_id').get(request.body, application_id, function(result){
                  response.render('applications/details', {application_details:result});
              });
          });
  
  
  &lt;form enctype="application/json" class="form-horizontal" role="form" method="post" action="/applications/update/{{application_details._id}}"&gt;
  &lt;input type="hidden" name="_method" value="PATCH" /&gt; 
  &lt;input type="text" name="name" class="form-control"&gt;
  &lt;button type="submit" class="btn btn-yellow pull-right"&gt;update&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this how i handle it</p>
  
  <pre><code>exports.get = function(request_body, application_id, call_back){
  var http_request = unirest("patch", "https://xx/api/applications/"+application_id);
  
  http_request.headers({
    "cache-control": "no-cache",
    "content-type": "application/json",
    "x-application-key": "xxxxxxxxxxxxxxxxxx"
  });
  
  http_request.type("json");
  http_request.send(request_body);
  
  http_request.end(function (http_response) {
    console.log(http_request.body);
    if (http_response.error) throw new Error(http_response.error);
  
      return call_back(http_response.body);
  });
  }
  </code></pre>