devSoyoung / STUDY

✏️ 공부한 내용 정리, 주제에 따라 분류
4 stars 1 forks source link

fetch: 비동기 Request 처리 API #16

Open devSoyoung opened 5 years ago

devSoyoung commented 5 years ago

fetch

const response = await fetch(`request url`);
// 요청에 대한 결과를 text()로 받아서 JSON 타입으로 변환
const result = JSON.parse(await response.text());

참고링크