REST API Fundamentals Flashcards
6 cards from real API practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 REST API Fundamentals flashcards as text
Which HTTP method is used to retrieve headers without a response body?
Answer: HEAD
HEAD returns only headers identical to a GET request but omits the response body.
What is the purpose of the OPTIONS HTTP method?
Answer: Describe communication options for the target
OPTIONS describes the communication options available for the target resource, commonly used in CORS preflight requests.
Which HTTP status code range indicates client-side errors?
Answer: 4xx
4xx status codes indicate client-side errors such as bad requests, unauthorized access, or not found.
What does a 500 Internal Server Error typically indicate?
Answer: An unexpected condition on the server
500 Internal Server Error means the server encountered an unexpected condition that prevented it from fulfilling the request.
Which constraint of REST requires that each request contain all information needed to process it?
Answer: Statelessness
Statelessness means each client request must contain all necessary information, and the server stores no client session state.
What media type is most commonly used in REST API responses?
Answer: application/json
application/json is the most widely used media type for REST API responses due to its lightweight and readable format.