HTTP Request Methods
1. ๐๐๐ง: GET Method is used to request
information from a website, Server or from API.
Example:
GET/api/employee/{employee-id}
2. ๐ฃ๐ข๐ฆ๐ง: POST Method is used to create a new
resource in server. We can send data to the server in the request body.
Example:
POST/api/employee/department
3. ๐ฃ๐จ๐ง: PUT Method is used to update an
existing record by sending the updated data as the content to request body to
the server.
Example:
POST/api/employee/55445
4. ๐๐๐๐๐ง๐: DELETE Method is used to remove
resources from the server.
Example:
DELETE/api/employee/55445
5. ๐ฃ๐๐ง๐๐: PATCH and PUT are similar use to
updates a resource, but it will update data partially but not fully.
Example:
PATCH/api/employee/55445{"Name: Employee Name"}
6. ๐๐๐๐: HEAD Method is like the GET but it
doesn't have any response body.
Example:
HEAD/api/employee
7. ๐ข๐ฃ๐ง๐๐ข๐ก๐ฆ: OPTIONS Method is used to get the
information about the possible communication options from the given URL.
Example:
OPTIONS/api/main.html/"Text"
8. ๐ง๐ฅ๐๐๐: This Method creates a loop back
test with the same request body that the client send to the server before, and
the successful response code is 200.
Example:
TRACE/api/main.html
9. ๐๐ข๐ก๐ก๐๐๐ง: This Method is used for making end
to end connections between a client and server.
Example:
CONNECT www.testwebsite.com:445 HTTP/1.1
Comments
Post a Comment