title: how to represent REST API URL for update the number of likes of some post
body: <p>I am studying REST API.
  I'm thinking about how to design the REST API for the following situations.</p>
  <p>&quot;If you click the Like button on a post, increase the number of likes on that post.&quot;</p>
  <p>This corresponds to an UPDATE among CRUD. Right?
  Then should I express the URL like this?</p>
  <pre><code>POST /post/{post_id}/likes
  </code></pre>
  <p>But there also will be situations like this.</p>
  <p>If you press the &quot;Like&quot; button again, Decrease the likes again.'</p>
  <p>In that case, would it be appropriate to send a request with this data in the payload?</p>
  <pre><code>POST /post/{post_id}/likes
  
  {
  countup: False // decrease likes
  }
  </code></pre>
  <p>I coudn't think of anything better than this,<br />
  but I feel strange that this isn't a very good idea.
  I want to design the API to match the convention.</p>
  <p>I'd appreciate it if you could give me some better ideas.</p>