const bodyData = {
grant_type : "authorization_code",
client_id : process.env.REACT_APP_REST_API_KEY,
redirect_uri : process.env.REACT_APP_REDIRECTURI_DEVELOP,
code : kakaoAuthCode
}
const queryStringBody = Object.keys(bodyData)
.map(k=> encodeURIComponent(k)+"="+encodeURI(bodyData[k]))
.join("&")
fetch("https://kauth.kakao.com/oauth/token",{
method : "POST",
headers : {
'content-type' : 'application/x-www-form-urlencoded;charset=utf-8',
},
body : queryStringBody
})
.then(res => res.json())
.then((data)=>{
console.log(data)
})
여기에서 변수 k의 의미와 역할이 정확히 무엇일까요?