fetch[2021.09.01]

김정훈·2021년 9월 1일
0

javascript

목록 보기
18/19

1. API

API(Application Programming Interface) 서로 다른 프로그램간에 
소통할 수 있게 도와주는 통신 규약을 뜻합니다. 웹에서 사용하면 '서버와 
고객간의 통신 규약'을 뜻합니다. 조금 더 쉽게 풀어말하면 '서버에게 
요청해서 데이터 가져오는 방법' 이 바로 API입니다.

2. fetch api를 이용한 네트워크 요청

let url =
  "https://v1.nocodeapi.com/codestates/google_sheets/YbFMAAgOPgIwEXUU?tabId=최신뉴스";
fetch(url)
  .then((response) => response.json())
  .then((json) => console.log(json))
  .catch((error) => console.log(error));
  
profile
프론트엔드 개발자를 꿈꾸고 있습니다!

0개의 댓글

관련 채용 정보