Complete the code to specify the HTTP method used to retrieve data in a REST API.
Use the [1] method to fetch resources in REST APIs.
The GET method is used to retrieve data from a server without modifying it, which is a core REST API practice.
Complete the code to indicate the recommended format for REST API responses.
REST APIs should return data in [1] format for easy parsing.
JSON is the most widely used format for REST API responses due to its simplicity and compatibility with web clients.
Fix the error in the REST API URL design to follow best practices.
The URL to get a user by ID should be '/api/users/[1]' instead of '/api/getUser?id=[1]'.
Using '/api/users/:id' is a RESTful way to represent resource identifiers in the URL path.
Fill both blanks to correctly implement pagination parameters in a REST API endpoint.
GET /api/items?[1]=10&[2]=2
Using 'limit' to specify the number of items per page and 'page' to specify the page number is a common pagination practice.
Fill all three blanks to correctly set HTTP status codes for REST API responses.
Return status [1] for a successful GET, [2] when a resource is created, and [3] when a resource is not found.
200 means OK for success, 201 means Created for new resources, and 404 means Not Found when resource is missing.