Intro
\n\nJSONPlaceholder is a free online REST API that you\
+ \ can use whenever you need some fake data.\n
It's great for tutorials,\
+ \ testing new libraries, sharing code examples, ...\n
Example
\n\ +\nRun this code in a console or from any site:\n
\nfetch('https://jsonplaceholder.typicode.com/todos/1')\n\
+ \ .then(response => response.json())\n .then(json => console.log(json))\n\
+
\n\n\n
\n
\nCongrats\
+ \ you've made your first call to JSONPlaceholder! \U0001F603 \U0001F389\n\
+ \nTip: you can use\n\nhttp://\n or\n\nhttps://\n\ + when making requests to JSONPlaceholder.\n
\n\n\n\nResources
\n\nJSONPlaceholder comes with a\ + \ set of 6 common resources:\n
\n\n\ + \ /posts\n | \n100 posts | \n
\n/comments\n | \n500 comments | \n\ +
\n/albums\n | \n100 albums | \n\ +
\n/photos\n | \n5000 photos | \n\ +
\n/todos\n | \n200 todos | \n\ +
\n/users\n | \n10 users | \n\ +
\nNote: resources have relations. For\ + \ example:\nposts have many\ncomments,\nalbums have many\n\ + photos, ... see below for routes examples.\n
\n\nRoutes
\n\ +\nAll HTTP methods are supported.\n
\nGET | \n\ +\n/posts\n | \n
GET | \n\n\ + /posts/1\n | \n
GET | \n\n\ + /posts/1/comments\n | \n
GET | \n\n/comments?postId=1\n\ + | \n
GET | \n\n/posts?userId=1\n\ + | \n
POST | \n/posts | \n
PUT | \n\ +/posts/1 | \n
PATCH | \n/posts/1 | \n
DELETE | \n/posts/1 | \n
\nNote:\ + \ you can view detailed examples\nhere.\n
\n\ + \nUse your own data
\n\n\nWith My JSON Server online service and a simple GitHub repo, you can have\ + \ your own online fake REST server in seconds.\n
\n