41. Q: How do you test Accept-Encoding with a value other than gzip?
A: Use a different encoding (e.g., deflate) and confirm that API either compresses accordingly or returns an uncompressed response.
42. Q: How do you verify resource representation by language (e.g., English, Spanish)?
A: Use the Accept-Language header and ensure response content is localized based on language (e.g., en, es).
43. Q: How to test representation by locale (e.g., en-US, fr-FR)?
A: Send Accept-Language: en-US and verify localized formatting like date, currency, etc.
44. Q: How do you test time zone-specific responses?
A: Set time zone headers or parameters (e.g., timezone=Asia/Kolkata) and ensure timestamps reflect the correct zone.
45. Q: How do you verify nested object responses?
A: Ensure that the API returns arrays or nested objects as expected in the schema (e.g., user → address → city).
46. Q: How do you test response timeout behavior?
A: Set a timeout (e.g., 2s) in your test tool and verify that the API responds within limits or throws timeout error if delayed.
47. Q: How do you validate handling of concurrent requests?
A: Send multiple requests in parallel and ensure the API can handle them without data corruption or delays.
48. Q: How to verify partial updates using PATCH?
A: Send a PATCH request with only one or two fields and confirm that only those fields are updated.
49. Q: How do you test custom HTTP headers in API responses?
A: Send specific headers in the request and verify that the response contains expected custom headers.
50. Q: How do you test file upload and download functionality?
A: Upload a file using POST/PUT and validate status, then try downloading it and check file integrity.