Notice
Recent Posts
Recent Comments
Link
목록Method (1)
솔미는 성장중
[JS] fetch()
fetch (주소, 옵션) 네트워크를 통해 리소스의 요청(request)과 응답(response)을 처리한다 promise 인스턴스를 반환 console.log(fetch('https://www.omdbapi.com/?apikey=********&s=avengers')) //Promise 📍 fetch를 통해 promise 인스턴스를 반환하니 뒤에 then 메소드를 써줄 수 있다. fetch('https://www.omdbapi.com/?apikey=********&s=avengers')) .then(res => console.log(res)) //Response 📍 json 메소드를 호출해야 데이터를 꺼낼 수 있다. fetch('https://www.omdbapi.com/?apikey=********&..
JavaScript
2023. 7. 31. 18:06