title: app.patch() is not working.get and delete is working but not patch.Is there any coding error what am i doing wrong?
body: <blockquote>
  <p>I want to create server which can perform CRUD.</p>
  </blockquote>
  <blockquote>
  <p>Movie model has only 1 property named title.</p>
  </blockquote>
  <blockquote>
  <p>I am able to create new movie,delete movie and search a movie by its _id.But update is not working.So,I have shown code below</p>
  </blockquote>
  <blockquote>
  <p>1.GET and DELETE i have tested on postman and working properly.</p>
  <blockquote>
  <p>[As i said get is working][1]</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <p>2.PATCH request is not working .</p>
  <blockquote>
  <p>It is not even giving any response and just loading.</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <p>localhost:3000/movies/id_of_movie</p>
  <blockquote>
  <p>here id_of_movie is id of movie for update.</p>
  </blockquote>
  </blockquote>
  <pre><code>const express=require('express');
  
  const  {mongoose}=require('./db/mongoose');
  
  const bodyParser=require('body-parser');
  
  const {Movie}=require('./db/models');
  
  const app=express();
  
  //middleware
  app.use(bodyParser.json());
  app.use(function(req, res, next) {
      res.header(&quot;Access-Control-Allow-Origin&quot;, &quot;*&quot;); // update to match the domain you will make the request from
      res.header(&quot;Access-Control-Allow-Methods&quot;, &quot;GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE&quot;); 
      res.header(&quot;Access-Control-Allow-Headers&quot;, &quot;Origin, X-Requested-With, Content-Type, Accept&quot;);
      next();
    });
  /* route handlers */
  app.get('/movies',(req,res)=&gt;{
      Movie.find({}).then((movies)=&gt;{
          res.send(movies);
      });
  });
  
  app.post('/movies',(req,res)=&gt;{
      let title=req.body.title;
  
      let newMovie=new Movie({
          title
      });
      newMovie.save().then((movieDoc)=&gt;{
          res.send(movieDoc);
      });
  });
  
  app.get('/',( req, res )=&gt;{
      res.send(&quot;hello&quot;);
  });
  
  app.patch('/movies/:id',(req,res)=&gt;{
      console.log(req.body);
      Movie.findByIdAndUpdate({
          _id:req.params.id
      },{
          $set:req.body
      }).then(()=&gt;{
          res.sendStatus({message:&quot;success&quot;});
      });
  });
  
  app.delete('/movies/:id',(req,res)=&gt;{
      Movie.findOneAndRemove({
          _id:req.params.id
      }).then((removedMovieDoc)=&gt;{
          res.send(removedMovieDoc);
      });
  });
  ```````````````````````````````````````````````````````
  
  
  [It is just loading and loading][2]
  
  
    [1]: https://i.stack.imgur.com/A6LVa.png
    [2]: https://i.stack.imgur.com/YauA7.png
  </code></pre>