Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object Promise showing instead of data pulled from API call

async function getData(url){
  var _data;
  let response = await fetch(url);
  console.log(response);
  return response;
 }
 
 getData('https://jsonplaceholder.typicode.com/todos/1').then(option=>{
 console.log(option)
 })
 Run code snippet
 
PREVIOUS NEXT
Tagged: #object #Promise #showing #data #pulled #API #call
ADD COMMENT
Topic
Name
6+1 =