180k views
4 votes
What is the difference between an HTTP POST and an HTTP GET? Give an example of when each would be used ?

1 Answer

4 votes

Difference:

An HTTP POST request is used to add new information to a server so it can be stored, and an HTTP GET request is used to retrieve stored information from a server.

Usage Examples:

Let's say you run a web server dedicated to storing football game scores.

A computer at a game that just finished may use an HTTP POST request to send the final score to your web server so you can store it.

Someone at home may be viewing a website for sports scores. That website's server may send an HTTP GET request to your server asking for the final score of a specific game, and your server would provide that information.

User Erjiang
by
7.5k points

No related questions found