Page 73 - Nodejs 교과서 개정2판
P. 73
פ
FODPEF63*$PNQPOFOU EFDPEF63*$PNQPOFOU
"+"9 ਃਸ ࠁյ ٸ rIUUQ MPDBMIPTU TFBSDI ֢٘sۢ ࣗী ೠӖ ٜযоח ҃о णפ
ࢲߡ ઙܨী ٮۄ ܰ݅ ࢲߡо ೠӖ ࣗܳ ೧ೞ ޅೞח ҃о חؘ ۡ ٸח window ё ݫࢲ
٘ੋ encodeURIComponent ݫࢲ٘ܳ ࢎਊפ ֢٘ীࢲب ࢎਊೡ ࣻ णפ
ೠӖ ࣗ ࠗ࠙݅ encodeURIComponent ݫࢲ٘۽ хषפ
(async () => {
try {
const result = await axios.get(`https://www.zerocho.com/api/search/${encodeURIComponent('노드')}`);
console.log(result);
console.log(result.data); // {}
} catch (error) {
console.error(error);
}
})();
֢٘ۄח ೠӖ ࣗо %EB%85%B8%EB%93%9Cۄח ޙৌ۽ ߸ജغणפ
߉ח ଃীࢲח decodeURIComponentܳ ࢎਊೞݶ ؾפ द ࠳ۄࡺ݅ ইפۄ ֢٘ীࢲب ࢎਊೡ ࣻ ण
פ
decodeURIComponent('%EB%85%B8%EB%93%9C'); // 노드
ೠӖ द ਗې ࢚క۽ ࠂҳغणפ റী աয়ח ઁীࢲ encodeURIComponent৬ decodeURIComponen
tܳ ॳח ҃ܳ ࠁѱ ؼ బؘ ೠӖਸ ܻೞӝ ਤೠ ѪۄҊ ࢤпೞݶ ؾפ
ؘఠ ࣘࢿҗ EBUBTFU
֢٘ܳ ਢ ࢲߡ۽ ࢎਊೞח ҃ ۄ ۠ূ٘ ৬ ࠼ߣೞѱ ؘఠܳ Ҋ߉ѱ ؾפ ٸ ࢲߡীࢲ
ࠁղળ ؘఠܳ ۠ূ٘ য٣ী ֍যঠ ೡ Ҋೞѱ ؾפ
۠ূ٘ী ؘఠܳ ղ۰ࠁյ ٸ ߣ૩۽ Ҋ۰೧ঠ ೡ ࠁউੑפ ۄܳ ݈ۄח ݈
ਸ ب۽ ۠ূ٘ী хೠ ؘఠܳ ղ۰ࠁղח Ѫ पࣻੑפ ࠺ߣഐ э Ѥ ղ۰ࠁղ ݃ࣁ
ਃ