Understanding GET versus POST Requests
The two main types of requests that you send to the web server are GET
and POST
. A GET
request passes parameters as part of the URL, whereas a POST
request passes them as part of the request data.
GET
Request URL:
http://localhost/code/example1.html?first=Brad&last=Dayley
GET
Request Data:
<empty>
POST
Request URL:
http://localhost/code/example1.html
POST
Request Data:
first=Brad last=Dayley
Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.