Deep Dive Into HTTP Protocol

Similar Posts:

Q: HTTP Methods

Name Summary
Post Post vs Put: Create objects vs Update objects
Patch Post vs Patch

Q: Typical HTTP Return Code

Name Summary
2xx Success  
3xx Redirection 301(Moved Permanently) vs 302 (Moved temporarily)
4xx Client errors 401(Unauthorized) vs 403(Forbidden); 404(Not Found)
5xx Server errors 503(Service Unavailable) vs 504(Gateway Timeout)

Link: List of HTTP status codes

Q: What are the differences between RPC vs REST?

A: REST is noun-centric and RPC is verb-centric.

Operation RPC (operation) REST (resource)
Signup POST /signup POST /persons
Resign POST /resign DELETE /persons/1234
Read person GET /readPerson?personid=1234 GET /persons/1234
Read person’s items list GET /readUsersItemsList?userid=1234 GET /persons/1234/items
Add item to person’s list POST /addItemToUsersItemsList POST /persons/1234/items
Update item POST /modifyItem PUT /items/456
Delete item POST /removeItem?itemId=456 DELETE /items/456

Link: Web service differences between REST and RPC

Q: Typical HTTP Headers

Name Summary
Last-Modified Header  
ETag Header  

Share It, If You Like It.

Leave a Reply

Your email address will not be published. Required fields are marked *