๋ชฉ๋กRESTfulAPI (1)

๐Ÿค ์€์ง€log ๐Ÿค

REST API

๐ŸŽฃ REST API : ํ”„๋ก ํŠธ์—”๋“œ ์›น์—์„œ ์„œ๋ฒ„์— ๋ฐ์ดํ„ฐ๋ฅผ ์š”์ฒญํ•˜๊ฑฐ๋‚˜ (๋ฐฐ๋‹ฌ์•ฑ์—์„œ ์„œ๋ฒ„์— ์ฃผ๋ฌธ์„ ๋„ฃ๊ฑฐ๋‚˜ ๋“ฑ) ์ด๋Ÿฐ ์„œ๋น„์Šค๋“ค์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๊ฒƒ์ด REST ๋ž€ ํ˜•์‹์˜ API ์ด๋‹ค. ๊ฐ ์š”์ฒญ์ด ์–ด๋–ค ๋™์ž‘์ด๋‚˜ ์ •๋ณด๋ฅผ ์œ„ํ•œ๊ฒƒ์ธ์ง€๋ฅผ ๊ทธ ์š”์ฒญ์˜ ๋ชจ์Šต ์ž์ฒด๋กœ ์ถ”๋ก ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. - ๋ ˆ์ŠคํŠธํ’€ํ•˜๊ฒŒ ๋งŒ๋“  API๋Š” ์š”์ฒญ์„ ๋ณด๋‚ด๋Š” ์ฃผ์†Œ๋งŒ์œผ๋กœ๋„ ๋Œ€๋žต ์ด๊ฒŒ ๋ญ˜ ํ•˜๋Š” ์š”์ฒญ์ธ์ง€ ํŒŒ์•…์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ์„œ๋ฒ„์— REST API๋กœ ์š”์ฒญ์„ ๋ณด๋‚ผ๋•Œ๋Š” HTTP๋ผ๋Š” ๊ทœ์•ฝ์— ๋”ฐ๋ผ ์‹ ํ˜ธ๋ฅผ ์ „์†กํ•œ๋‹ค. ๐ŸŽฃ REST API ์—์„œ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋ฉ”์†Œ๋“œ : GET : ๋ฐ์ดํ„ฐ๋ฅผ Read, ์กฐํšŒ POST : Create, ์ƒˆ๋กœ์šด ์ •๋ณด ์ถ”๊ฐ€ DELETE : Delete, ์ •๋ณด ์‚ญ์ œ PUT : Update, ์ •๋ณด๋ฅผ ํ†ต์งธ๋กœ ๋ณ€๊ฒฝํ• ๋•Œ PATCH : Update, ์ •๋ณด๋ฅผ ์ผ๋ถ€๋งŒ ๋ณ€..

๐ŸŠ Grammar 2022. 10. 23. 14:49