469,328 Members | 1,237 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

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 17523
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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.