๐Ÿšง RESTful API

Min-Ho Leeยท2020๋…„ 7์›” 27์ผ
1

Learn Django

๋ชฉ๋ก ๋ณด๊ธฐ
7/13
post-thumbnail

Monday_August_3
.
.
.
ํ•ญ์ƒ ํ•˜๋Š” ๋ง์ด์ง€๋งŒ ์•„์ง๋„ ์—ฌ๋ ต๋‹ค.

๊ทธ๋ž˜๋„ ์ฒ˜์Œ์— ๋น„ํ•˜๋ฉด Django์™€ ๋งŽ์ด ์นœํ•ด์กŒ๋‹ค.

urls.py์™€ views.py๋กœ EndPoint urldmf REST์— ๋งž๊ฒŒ ์ง€์ •ํ•ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค.

๐Ÿ™„ REST

REST(REpresentational State Transfer)๋ž€ ์›น์— ์กด์žฌํ•˜๋Š” ๋ชจ๋“  ์ž์›(resorce, ex. ์ด๋ฏธ์ง€, ๋™์˜์ƒ, ๋ฐ์ดํ„ฐ)์— ๊ณ ์œ ํ•œ URI๋ฅผ ๋ถ€์—ฌํ•˜์—ฌ ์ž์›์— ๋Œ€ํ•œ ์ฃผ์†Œ๋ฅผ ์ง€์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•๋ก , ๋˜๋Š” ๊ทœ์น™์ž…๋‹ˆ๋‹ค. ํ˜„์žฌ ๊ฐ€์žฅ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ, RESTful API๋Š” REST ํŠน์ง•์„ ์ง€ํ‚ค๋ฉด์„œ API๋ฅผ ์ œ๊ณตํ•œ๋‹ค๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค.

๋ฌด์Šจ๋ง์ธ์ง€ ๋‡Œ์ •์ง€๊ฐ€ ์˜จ๋‹ค๊ตฌ์š”?

์‰ฝ๊ฒŒ ๋งํ•ด, ์–ด๋– ํ•œ url๋กœ ๊ฐ€์•ผ๋งŒ ํŠน์ • ์ •๋ณด๋“ค์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

profile
๐Ÿ‡ Rabbit can take a rest, but ๐Ÿข turtle can't

0๊ฐœ์˜ ๋Œ“๊ธ€