0% found this document useful (0 votes)
10 views11 pages

HTTP Method You Must Know

HTTP Method you must know

Uploaded by

Mohamed MY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

HTTP Method You Must Know

HTTP Method you must know

Uploaded by

Mohamed MY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Giri Yaram 1

HTTP
methods
you must
know
Giri Yaram 2

Get
Example

GET/ api/customers

Return all customers

Description

Retrieves data from server. it should


retrieve data and should have no
other side effect.
Giri Yaram 3

POST
Example

POST/ api/customers

Post data to the server

Description

Used to send data to a server to


create a new resource. The data is
included in the body of the request
Giri Yaram 4

PUT
Example

PUT/ api/customers/123

Update customer by ID

Description

Similar to POST, but it’s used to


update an existing resource
Giri Yaram 5

PATCH
Example

PATCH/ api/customers/1234
{’name’: “cherry”}
Update name for customer
by ID 1234
Description

Used to update resources but it only


updates the fields that were
included in the request
Giri Yaram 6

DELETE
Example

DELETE/ api/customers/143

Delete customer by ID

Description

Deletes a resource.
Regardless of number of calls, it
returns the same result.
Giri Yaram 7

HEAD
Example

HEAD/ api/customers

Similar to GET, but does not


return the list of customers
Description

Typically used to check if a resource


is available and to get the metadata.
Giri Yaram 8

OPTIONS
Example

OPTIONS/ api/main.html/1.1

Return Permitted HTTP


method in this URL
Description

Used to get information about the


possible communication options for
the given URL or an asterisk to refer
to the entire server.
Giri Yaram 9

TRACE
Example

TRACE/ api/main.html

Responds the exact request


that client sent
Description

Used for diagnosis purposes. It


echoes the received request so that
a client can see what changes or
additions have been made by
intermediate servers
Giri Yaram 10

CONNECT
Example

Connect www.example.com:8080

Connect to the URL Provided

Description

Used for making end to end


connections between a client and a
server, it makes a two way
connection like a tunnel between
them.
Enjoyed this ?

Follow for more


such content like
this

You might also like