🙌fetch 함수는 Promise 객체를 리턴합니다(Promise 동작원리) 안녕하세요 TriplexLab입니다. 오늘은 fetch 함수에 관해서 자세히 알아봅시다. fetch 함수는 promise 객체를 리턴합니다. (fetch함수는 서버에 리퀘스트를 보내고 리스폰스를 받는 하나의 작업을 수행합니다.) console.log('Start!'); fetch('https://jsonplaceholder.typicode.com/users') //(fetch함수는 서버에 리퀘스트를 보내고 리스폰스를 받는 하나의 작업을 수행 합니다.) .then((response) => response.text()) .then((result) => {console.log(result)}); console.log('End'); ..
fetch 함수는 Promise 객체를 리턴합니다#3
🙌fetch 함수는 Promise 객체를 리턴합니다(Promise 동작원리) 안녕하세요 TriplexLab입니다. 오늘은 fetch 함수에 관해서 자세히 알아봅시다. fetch 함수는 promise 객체를 리턴합니다. (fetch함수는 서버에 리퀘스트를 보내고 리스폰스를 받는 하나의 작업을 수행합니다.) console.log('Start!'); fetch('https://jsonplaceholder.typicode.com/users') //(fetch함수는 서버에 리퀘스트를 보내고 리스폰스를 받는 하나의 작업을 수행 합니다.) .then((response) => response.text()) .then((result) => {console.log(result)}); console.log('End'); ..
2021.10.30