🌐 REST API κ΄€μ μ—μ„œ λ°”λΌλ³΄λŠ” HTTP μƒνƒœμ½”λ“œ

sunyoungΒ·2022λ…„ 4μ›” 16일
0
post-custom-banner

βœ… 2XX - Success

200 - OK

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ„ μ„œλ²„κ°€ μ •μƒμ μœΌλ‘œ μ²˜λ¦¬ν•¨

201 - Created

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ„ μ„œλ²„κ°€ μ •μƒμ μœΌλ‘œ μ²˜λ¦¬ν–ˆκ³  μƒˆλ‘œμš΄ λ¦¬μ†ŒμŠ€κ°€ 생김

202 - Accepted

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ€ μ •μƒμ μ΄λ‚˜, μ„œλ²„κ°€ 아직 μš”μ²­μ„ μ™„λ£Œν•˜μ§€ λͺ»ν•¨

204 - No Content

ν΄λΌμ΄μ–ΈνŠΈ μš”μ²­μ€ μ •μƒμ μ΄μ§€λ§Œ 컨텐츠λ₯Ό μ œκ³΅ν•˜μ§€ μ•ŠμŒ



❌ 4XX - Client errors

400 - Bad Request

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ΄ μœ νš¨ν•˜μ§€ μ•Šμ•„ 더 이상 μž‘μ—…μ„ μ§„ν–‰ν•˜μ§€ μ•ŠλŠ” 경우

401 - Unauthorized

ν΄λΌμ΄μ–ΈνŠΈκ°€ κΆŒν•œμ΄ μ—†κΈ° λ•Œλ¬Έμ— μž‘μ—…μ„ 진행할 수 μ—†λŠ” 경우

404 - Not Found

ν΄λΌμ΄μ–ΈνŠΈκ°€ μš”μ²­ν•œ μžμ›μ΄ μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 경우

405 - Method Not Allowed

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ΄ ν—ˆμš©λ˜μ§€ μ•ŠλŠ” λ©”μ†Œλ“œμΈ 경우

πŸ’‘ 404? 405? ν—·κ°ˆλ¦΄ λ•Œ

404 - GET, PATCH, DELETE
405 - POST

409 - Conflict

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ΄ μ„œλ²„μ˜ μƒνƒœμ™€ 좩돌이 λ°œμƒν•œ 경우

429 - Too Many Requests

ν΄λΌμ΄μ–ΈνŠΈκ°€ 일정 μ‹œκ°„ λ™μ•ˆ λ„ˆλ¬΄ λ§Žμ€ μš”μ²­μ„ 보낸 경우



❌ 5XX - Server errors

500, 502, 503....



좜처: https://sanghaklee.tistory.com/61 [μ΄μƒν•™μ˜ κ°œλ°œλΈ”λ‘œκ·Έ]

profile
πŸ’»βœ¨
post-custom-banner

0개의 λŒ“κΈ€