Mainpage
Last updated
Last updated
์ฌ์ฉ์๊ฐ ์ ๋ ฅํ lms ์์ด๋์ ๋น๋ฐ๋ฒํธ๋ฅผ ์๋ฒ์ ๋๊ธฐ๊ณ json์ ํํ๋ก ์๋ต์ ๋ฐ๋๋ค.
๋ฏธ๋ฆฌ ์์ฑํด๋ API์ ๋ฐ๋ผ method๋ post ๋ฐฉ์์ผ๋ก, ์ฌ์ฉ์์ LMS ID์ PW๋ฅผ ์๋ฒ์ request๋ฅผ ๋ณด๋ธ๋ค.
์ด๋ json์ ํํ๋ก id์ password ๊ฐ์ ์ ์กํ๊ธฐ ๋๋ฌธ์ Content-Type ํค๋๋ฅผ application/json๋ก ์ค์ ํ๊ณ body์์๋ JSON.stringify์ ์ด์ฉํด์ JSON ๋ฌธ์์ด๋ก ๋ณํ์ ํด์ request๋ฅผ ๋ณด๋ด์ผ ํ๋ค.
json ๋ฌธ์์ด๋ก ์๋ต๋ฐ์ response๋ js ๊ฐ์ฒด๋ก ๋ณํํ๊ณ , json์ 'statusโ๊ฐ์ ๋ฐ๋ผ ์ฌ์ฉ์์๊ฒ ์ค๋ฅ๋ฅผ ์๋ฆฌ๋์ง, secondpage๋ก ๋์ด๊ฐ ๋ฏธ์ ์ถ ํญ๋ชฉ์ ๋ณด์ฌ์ฃผ๊ฒ ๋๋ค.