[React/Axios] ๐Ÿคฌ Axios message: 'Network Error'(CORS ์˜ค๋ฅ˜)
ยท
Frontend/React
๐Ÿšจ ์˜ค๋ฅ˜ ๋ฐœ์ƒ AxiosError message: 'Network Error' const userInfoPatch = async (userInfo) => { try { // url: ์„œ๋ฒ„ ์ฃผ์†Œ, id: ์‚ฌ์šฉ์ž ์•„์ด๋””, userInfo: ์‚ฌ์šฉ์ž ์ •๋ณด ๊ฐ์ฒด await axios.patch(`${url}/member/${id}`, userInfo).then(() => { alert('์ˆ˜์ •์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); }); } catch (error) { console.log(error); } }; ํด๋ผ์ด์–ธํŠธ ์ฝ”๋“œ์—์„œ๋Š” ๋ณ„๋‹ค๋ฅธ ๋ฌธ์ œ๊ฐ€ ์—†์–ด ๋ณด์˜€๊ณ , ์„œ๋ฒ„ ์ธก์—์„œ ๋ถ„๋ช… ์ ‘๊ทผ์„ ํ—ˆ์šฉํ•˜๋Š” ๋ฉ”์„œ๋“œ๋กœ PATCH์— ๋Œ€ํ•ด ๋”ฐ๋กœ ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์ฃผ์—ˆ๋‹ค. ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ GET, POST, DELETE ๋“ฑ ์—ฌ๋Ÿฌ ๋ฐฉ์‹์œผ๋กœ ์„œ๋ฒ„์— ์š”์ฒญํ• ..
_์„ฑํ˜ธ_
'network error' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก