상세 컨텐츠

본문 제목

Using HTTP Methods for Restfulservice(post,get,put,delete)

Developer/spring framework

by gabriel.LIM 2015. 8. 4. 15:22

본문

1. post : 새로운 아이디 생성

2. get : 정보 조회

3. put : 정보 업데이트

4. delete : 정보 삭제

 

HTTP Verb CRUD Entire Collection (e.g. /customers) Specific Item (e.g. /customers/{id})
POST Create 201 (Created), 'Location' header with link to /customers/{id} containing new ID. 404 (Not Found), 409 (Conflict) if resource already exists..
GET Read 200 (OK), list of customers. Use pagination, sorting and filtering to navigate big lists. 200 (OK), single customer. 404 (Not Found), if ID not found or invalid.
PUT Update 404 (Not Found), unless you want to update/replace every resource in the entire collection. 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid.
DELETE Delete 404 (Not Found), unless you want to delete the whole collection—not often desirable. 200 (OK). 404 (Not Found), if ID not found or invalid.

 

http://www.restapitutorial.com/lessons/httpmethods.html

'Developer > spring framework' 카테고리의 다른 글

properties 실시간 리로딩  (0) 2015.10.26
다국어 지원 LocaleResolver  (0) 2014.12.18
spring MVC 메시지 프로퍼티 설정  (0) 2014.12.18
jquery 숫자만 입력받기  (0) 2014.12.11
Spring AOP xml 설정  (0) 2014.12.10

관련글 더보기