Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Fetch Await

async function handleFetchAwait(id) {
  let response = await fetch(`https://samplesite.com/users_id/${id}`);
  let data = await response.json()
  return data;
}

handleFetchAwait(21)
  .then(data => console.log(data)); 
 
PREVIOUS NEXT
Tagged: #Fetch #Await
ADD COMMENT
Topic
Name
8+4 =