
fetch("https://api.github.com/repos/{소유자이름}/{레포이름}/contents/{파일이름}")
.then((response) => response.json())
.then((data) =>{
console.log(data) // json 파일
console.log(data.content) //파일 내용 base64로 받아와진다
console.log(decodeURIComponent(atob(data.content))); //utf-8로 디코딩
});

fetch("https://api.github.com/repos/{소유자이름}/{레포이름}/readme")
.then((response) => response.json())
.then((data) =>{
console.log(data) // json 파일
console.log(data.content) //파일 내용 base64로 받아와진다
console.log(decodeURIComponent(atob(data.content))); //utf-8로 디코딩
});
