HTTP interview questions — Hard
209 hard-level HTTP questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.
What this covers
HTTP appears throughout API Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.
7 example questions
1. During a code review, a reviewer asks: Which status family indicates a client error?
- A. 2xx.
- B. 4xx.correct
- C. 3xx.
- D. 5xx.
Why: 4xx are client errors; 5xx server errors, 2xx success, 3xx redirect.
2. Regarding HTTP, which of the following is a false statement?
- A. Status 429 indicates a server-side crash.correct
- B. POST is not idempotent: repeating it may create multiple resources.
- C. Status 404 Not Found means the requested resource does not exist.
- D. Idempotency keys let clients safely retry POST requests without duplicating effects.
Why: The selected statement is false. The other options are accurate statements about HTTP.
3. In a QA certification mock exam: 201 Created is typically returned by which method?
- A. GET.
- B. POST creating a resource.correct
- C. DELETE.
- D. HEAD.
Why: A successful resource-creating POST commonly returns 201.
4. Identify the INCORRECT statement about HTTP:
- A. GET requests should be safe and idempotent, retrieving data without side effects.
- B. Status 404 Not Found means the requested resource does not exist.
- C. The Content-Type header specifies the client's preferred language.correct
- D. Status 401 Unauthorized means authentication is missing or invalid.
Why: The selected statement is false. The other options are accurate statements about HTTP.
5. Which statement about HTTP is NOT correct?
- A. Status 204 No Content indicates success with no response body.
- B. HTTP status code 200 means the request succeeded.
- C. Idempotency keys let clients safely retry POST requests without duplicating effects.
- D. Status 500 indicates the client sent invalid JSON.correct
Why: The selected statement is false. The other options are accurate statements about HTTP.
6. Which of the following statements about HTTP is FALSE?
- A. Status 404 Not Found means the requested resource does not exist.
- B. Status 503 Service Unavailable means the server is temporarily unable to handle requests.
- C. POST is guaranteed idempotent by the HTTP specification.correct
- D. Status 429 Too Many Requests indicates the client hit a rate limit.
Why: The selected statement is false. The other options are accurate statements about HTTP.
7. Which method is idempotent and used to replace a resource?
- A. POST.
- B. PUT.correct
- C. PATCH.
- D. CONNECT.
Why: PUT replaces a resource and is idempotent.