API Testing · Middle · Question 57 of 75
What does compression like Content-Encoding: gzip mean for API tests?
- 1Compressed responses can't contain any JSON data at all
- 2Clients must decode it; tests check headers and correct content
- 3Compression only applies to image files
Show the answer
Correct answer: Clients must decode it; tests check headers and correct content
Explanation
Most HTTP clients decode automatically. Tests check large responses are compressed and that Accept-Encoding is respected.