September 2017
Intermediate to advanced
244 pages
6h 44m
English
The second one seems more reasonable as in that one only needs to have a comment's ID without worrying about the post ID of that comment. And since a comment's ID is unique, we don't need to have the post's ID to get the comment. So, we will proceed with the second URL that is GET /comment/1 HTTP/1.1.
{id:1, post_id:1, comment:"An Awesome Post", link: "/comments/1"}
Since any comment can only exist against some post, the response includes post_id as well.
Read now
Unlock full access