Instead of having randomly named setter and getter URLs and using GET for all the getters and POST for all the setters, we try to have the URLs identify resources, and then use the HTTP actions GET, POST, PUT and DELETE (đọc, tạo, sửa và xoá) to do stuff to them
-
-
POST /articles HTTP/1.1<article>
<title>blue stapler</title>
<price currency="eur">7.50</price>
</article>
HTTP/1.1 201 Created
Location: /articles/63636
PUT /articles/green-stapler HTTP/1.1<article>
<title>blue stapler</title>
<price currency="eur">7.50</price>
</article>
HTTP/1.1 201 Created
Location: /articles/green-stapler