200-301 Question 489
Select 2A network administrator is designing an application that interacts with a REST-based API to retrieve and update data. Which HTTP verbs should the administrator use to implement the application's 'retrieve' and 'update' functionalities?
- A
GET
- B
POST
- C
PUT
- D
DELETE
Show answer and explanation
Correct answers: A, C
Explanation
In REST-based APIs, HTTP verbs are used to define the desired action on the resource. GET is used for retrieving data, while PUT is used for updating existing data. Understanding these verbs is essential for designing applications that interact effectively with REST APIs.
- A. Correct.
GET is the correct HTTP verb to retrieve data from a REST-based API without altering the resource.
- B. Incorrect.
POST is primarily used to create new data or resources on the server, not for retrieval or updating.
- C. Correct.
PUT is the correct HTTP verb to update an existing resource in a REST-based API.
- D. Incorrect.
DELETE is used to remove data or resources from the server, not for retrieval or updating.