JSONFaker is a service that provides free REST API, with this you can easily do testing and prototyping.
Run this code here, in a console or from any site.
fetch('https://jsonfaker.000webhost.com/api/posts/1')
.then(response => response.json())
.then(json => console.log(json))
{
// Result
}
JSONFaker is a free online REST API that you can use whenever you need some fake data. It can be in a README on GitHub, for a demo on CodeSandbox, in code examples on Stack Overflow, ...or simply to test things locally.
JSONFaker comes with a set of 4 common resources:
All HTTP methods are supported. Use https for your requests.
GET | /posts |
POST | /posts |
PUT | /posts/1 |
DELETE | /posts/1 |
Notes
- If routes is protected, so do you login using email: ujang@example.com, password: rahasia1234,
- Resources have relations. For example: posts have many comments, ... see guide for the full list.