HTTP Request Types | CodePath Cliffnotes (2024)

All requests are sent using an "HTTP method". The method designates the type of request being made to the web server. The most common types of request methods are GET and POST but there are many others, including HEAD, PUT, DELETE, CONNECT, and OPTIONS. GET and POST are widely supported while support for other methods is sometimes limited but expanding.

GET requests

  • Sent when URL is submitted in the browser location bar or a user clicks a link
  • Send data in the URL and query string
  • Reloadable
  • Can bookmark
  • Used for read-only operations
    • View, search, sort, or filter data
    • Data does not change

POST requests

  • Sent when web form is submitted
  • Send data in the URL and as an attachment
  • Semi-reloadable (prompt to send data again)
  • Can not bookmark
  • Used for write operations
    • Create, update, or delete data
    • Data does change

Requests should match their purpose. Reject or ignore unexpected request methods. If code is not expecting to receive form data then it should allow GET requests but should reject POST requests. If code is expecting to receive form data then it should allow POST data but should reject GET requests.

HTTP Request Types | CodePath  Cliffnotes (2024)
Top Articles
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 5725

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.