No installation. No configuration. No waste of time.
We already provide all the service you need to mock your backend API.
The only thing you have to do
is to define the resources you want to receive.
Visit the "Servers" page which you can see on the left menu at app.jsonserver.io and click on the "Create Server" button.
Name the server as you need, that's it. You have created your first Fake API Server. You can see your server in the server listing.
At the server list page, you can display the API token for each of your server separately.
You have to send this API token with each request as header parameter name "X-Jsio-Token". So copy the token and paste into your application api client configuration.
This kind of resources are defined and saved online at jsonserver.io. You can create, edit and manage all your saved resources online and request them from your application like a real API.
For your special needs, we're also able to deliver your fake resources without any saved resources. Just send a POST request to api.jsonserver.io with the resource schema as request body and you will get the response you want.
If you decide to use saved resource (recommended by us) then you can start to create and define your resources with the build-in code editor. Otherwise, you can start immediately with dynamic request to retrieve your fake data.
axios.defaults.baseURL = 'https://api.jsonsever.io'
axios.defaults.headers.common['X-Jsio-Token'] = JSIO_TOKEN;
// The resource "/products/*/details" has been created via
// the saved resources feature on app.jsonserver.io
axios.get(`/products/${id}/details`).then(res => {
let productDetails = res.data
})