Documentation
You can copy paste the code in your browser console to quickly test Store API.
Todo
Get all todos
fetch('STORE_CLIENT_API_BASE_URL/todos')
.then(response => response.json())
.then(json => console.log(json))
Add new todo
fetch('STORE_CLIENT_API_BASE_URL/todos',
{
method: 'POST',
body: JSON.stringify({
"title": "Conduct code reviews regularly",
"status": "TODO",
"description": "Some description"
}),
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
})
.then(response => response.json())
.then(json => console.log(json))
Update todo
fetch('STORE_CLIENT_API_BASE_URL/todos/654fbbee25a4902cc1fc7032',
{
method: 'PUT',
body: JSON.stringify({
"status": "IN_PROGRESS",
"description": "Update description"
}),
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
})
.then(response => response.json())
.then(json => console.log(json))
Delete todo
fetch('STORE_CLIENT_API_BASE_URL/todos/654fbbee25a4902cc1fc7032',
{
method: 'DELETE',
})
.then(response => response.json())
.then(json => console.log(json))