Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Web, API & dataJuniorCommonTheory

Which parts of HTTP requests and responses should an API tester inspect?

Answer

Inspect method and target, status, headers, cookies, content type, body, timing and redirects. Validate semantics and side effects, not only payload values, and correlate the exchange with server logs or persisted state when available.

Strong answer includes

  • headers and body
  • semantics and side effects
  • observability

Practical example

A test asserts only that a POST /orders call returns 201 with the right JSON body, but misses that the response is missing a Location header and that the order was actually written twice to the database — checking headers and correlating with server-side state would have caught both issues.

#http#headers#api-testing

Sources

MDN HTTP referenceMozilla · HTTP methods, messages, status codes, headers, cookies and caching