API(REST) ‐ gRPC ‐ GraphQL ‐ Web Services - prkirankumar/interview-preparation GitHub Wiki
- what is the core difference between HTTP PUT and HTTP POST, HTTP PUT and HTTP PATCH? (B)
[GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET)
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
[HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD)
The HEAD method asks for a response identical to a GET request, but without the response body.
[POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)
The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.
[PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT)
The PUT method replaces all current representations of the target resource with the request [content](https://developer.mozilla.org/en-US/docs/Glossary/HTTP_Content).
[DELETE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE)
The DELETE method deletes the specified resource.
[CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT)
The CONNECT method establishes a tunnel to the server identified by the target resource.
[OPTIONS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS)
The OPTIONS method describes the communication options for the target resource.
[TRACE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE)
The TRACE method performs a message loop-back test along the path to the target resource.
[PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH)
The PATCH method applies partial modifications to a resource.
- Which method is not Idempotent ?
POST and PUT
- Explain about HTTP OPTIONS? (I/A)
- When will your Web API is treated as REST API?
No, all Web APIs are not REST APIs. While both use the HTTP protocol for communication, a REST API uses specific URL structures, request types, and response codes to define its operations. REST stands for REpresentational State Transfer, an architectural style for defining network-based applications. follows Hypermedia as the Engine of Application State (HATEOAS).