HTTP Basics2
HTTP Basics2
Methods
1. GET
2. HEAD
3. POST
4. PUT
5. DELETE
6. CONNECT
7. OPTIONS
8. TRACE
9. PATCH
HTTP Request
GET
Methods
The GET method requests a representation of the
specified resource. Requests using GET should
only retrieve data and should not contain a
request content.
HEAD
The HEAD method asks for a response identical to
a GET request, but without a response body.
POST
The POST method submits an entity to the
specified resource, often causing a change in
state or side effects on the server.
HTTP Request
Methods
PUT
The PUT method replaces all current
representations of the target resource with
the request content.
DELETE
The DELETE method deletes the specified
resource.
CONNECT
The CONNECT method establishes a tunnel to
the server identified by the target resource.
HTTP Request
Methods
OPTIONS
The OPTIONS method describes the
communication options for the target
resource.
TRACE
The TRACE method performs a message loop-
back test along the path to the target
resource.
PATCH
The PATCH method applies partial modifications
HTTP response status
codes
HTTP response status codes indicate whether a
specific HTTP request has
1.Informational been successfully
responses
completed.
Responses(100
are– grouped
199) in five classes
2.Successful responses
(200 – 299)
3.Redirection messages
(300 – 399)
4.Client error responses
(400 – 499)
100 Continue
Informational res
ponses
This interim response indicates that the client should continue
the request or ignore the response if the request is already
finished.
101 Switching Protocols
This code is sent in response to an Upgrade request header
from the client and indicates the protocol the server is
switching to.
102 Processing Deprecated
This code was used in WebDAV contexts to indicate that a
request has been received by the server, but no status was
available at the time of the response.
103 Early Hints
This status code is primarily intended to be used with the Link
header, letting the user agent start preloading resources
while the server prepares a response or preconnect to an
Successful res
ponses
200 OK
The request succeeded
201 Created
The request succeeded, and a new resource was
created as a result
202 Accepted
The request has been received but not yet acted upon
Successful res
203 Non-Authoritative ponses
Information
This response code means the returned metadata is not exactly the same
as is available from the origin server, but is collected from a local or a
third-party copy.
204 No Content
There is no content to send for this request, but the headers are useful.
The user agent may update its cached headers for this resource with
the new ones.
302 Found
This response code means that the URI of requested resource
has been changed temporarily. Further changes in the URI
might be made in the future, so the same URI should be
303 See Other Redirection me
ssages
The server sent this response to direct the client to get
the requested resource at another URI with a GET
request.