471,887 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

What is the difference between "GET", "HEAD", "PUT" or "POST" methods

20
What is the difference between for the following methods.

"GET", "HEAD", "PUT" or "POST".


Ex:my $req =HTTP::Request->new(GET =>$url1);


Bhuvan.
Mar 31 '07 #1
3 17877
KevinADC
4,059 Expert 2GB
do you mean what they are as methods to HTTP::Request or what they are in general?

get - just gets a document
head - is generally just used to see if a document is present
post - sends data to the server
put - I don't think there is a put for HTTP::Request but I'm not sure

as far as in general:

http request methods
Mar 31 '07 #2
I think you are talking about a restful API.

GET : get a user
Head : checks a user exists
POST: Used to create a new user
PUT: Updade a users information

This is pretty much how restful API's I have worked on are.

<link removed>
Oct 12 '11 #3
Get : retrieve information
Post: create new entity and update existing entity
Put: create new entity and update existing entity but put request is idempotent
Head: obtaining metainformation about the entity
Jul 3 '15 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

45 posts views Thread by Gregory Petrosyan | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
7 posts views Thread by czechboy | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.