MENU

Fun & Interesting

When to use HTTP GET vs POST?

Hussein Nasser 32,131 6 years ago
Video Not Working? Fix It Now

HTTP methods Get and POST are the most popular http methods used on the web. Each carries its own differences and properties. It can confusing to get to choose when to use POST over GET. In this video we will explain the differences, use cases and the benefits of using GET and POST. HTTP Request Lets start with explaining the anatomy of a HTTP requests, the main components of a request It has. URL it has method type, headers content-type, cookies erc and body the content   Property GET POST   Body No Yes   Data Request Limit Yes (2048 bytes) No limit   Data Type Ascii only Any data   Safe Yes No   Idempotent Yes No   Caching and Prefetching Yes No   Bookmarkable Yes No   Security? No Yes Body GET Requests Dont have Body Post does Data request limit Url + body Data type Get Only ascii Get URL only (2048) POST no limit Caching and prefetching Safe Modifies the resource Idempotency Bookmark You can copy the url share it to twitter and anyone will get to that resource with all that parameters Read request that need to send lot of data to the server will have to use POST. (Like tracing) 9:10 e-tag reference Stay Awesome! Hussein

Comment