Answers for "jsonplaceholder"

1

jsonplaceholder

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(json => console.log(json))
Posted by: Guest on July-25-2020
2

json placholder

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(json => console.log(json))
Posted by: Guest on December-12-2019
0

jsonplaceholder

// fetch format
fetch('https://jsonplaceholder.typicode.com/posts', {
  method: 'POST',
  body: JSON.stringify({
    title: 'foo',
    body: 'bar',
    userId: 1,
  }),
  headers: {
    'Content-type': 'application/json; charset=UTF-8',
  },
})
  .then((response) => response.json())
  .then((json) => console.log(json));
Posted by: Guest on February-11-2021
0

jsonplaceholder

{
	"userId": 1,
	"id": 1,
	"title": "delectus aut autem",
	"completed": false
}
Posted by: Guest on June-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language