MrEasy
0
Q:

fetch api tutorial

fetch('my/url/').then(respone()=>{
		console.log(response);
}
26
fetch('http://example.com/movies.json')
  .then((response) => {
    return response.json();
  })
  .then((myJson) => {
    console.log(myJson);
  });
16
fetch('http://example.com/movies.json')
  .then(response => response.json())
  .then(data => console.log(data));
3
fetch('https://api.github.com/users/manishmshiva', {
  method: "GET",
  headers: {"Content-type": "application/json;charset=UTF-8"}
})
.then(response => response.json()) 
.then(json => console.log(json)); 
.catch(err => console.log(err));
0

New to Communities?

Join the community