HTTP Methods
for
RESTFul API
Quick Guide
J Academyrelated
CRUD opr.
a)
HTTP Response Codes
Method OK /Not OK
404 (not found)
GET 200 (ok) 400 (bad rea.)
200 (ok)
POST 201 (created) 204 (no content)
204 (no content)
200 (ok)
DELETE 404 (not found)
202 (accepted) 495 (not allowed)
PUT 200 (ok) 204 (no content)
201 (created) 405 (not allowed)
200 (ok)
PATCH 201 (created) 204 (no-content)
Req. URL Sample
(concerns)
URL/Userslist
URL/Userinfo/id
URL/CreateUser
URL/RemoveComment/id
URL/UpdateAlias /id/newalias
URL/UpdatePrice/id/newprice
(Alo can be wed for create
operation of single resources ve
POST which is alto’ great for
collections)
URL/ChangePass /id/newpass
(Mostly for Partal Update of Single
Resource)
Sample
Function
GetUserList
GetUserContacts
CreateUser
AddUser
RemoveComment
UpdateAlias
UpdatePrice
UpdatePassword
*C.R.U.D.: used for CRUD Operations (Create , Retrieve, Update, Delete)HTTP Methods Used
GET
POST
DELETE
PUT
OPTIONS
CONNECT
TRACE rarely
4
Patch is a laggy & somehow a method not
supported on all browsers, servers & web
application frameworksMerial
J Academy
Cheated by APi
ead trair
pcenterth Academy