Ques:- What are HTTP methods and how are they used in APIs
Asked In :-
Xoriant Solutions Pvt Ltd, KRIOS Info Solutions, Itobuz Technologies, Addweb solutions, Solace Infotech, TNQ Technologies, MatchMove India, Sun Technology Integrators, Spectra Medix India, Novalnet e-Solutions,
Right Answer:
HTTP methods are standardized request types used in APIs to perform actions on resources. The main methods are:
1. **GET**: Retrieve data from a server.
2. **POST**: Send data to a server to create a new resource.
3. **PUT**: Update an existing resource on the server.
4. **DELETE**: Remove a resource from the server.
5. **PATCH**: Apply partial modifications to a resource.
These methods define the action to be performed on the specified resource in the API.
HTTP methods are standardized request types used in APIs to perform actions on resources. The main methods are:
1. **GET**: Retrieve data from a server.
2. **POST**: Send data to a server to create a new resource.
3. **PUT**: Update an existing resource on the server.
4. **DELETE**: Remove a resource from the server.
5. **PATCH**: Apply partial modifications to a resource.
These methods define the action to be performed on the specified resource in the API.