Quick answer: Mocking JSON endpoints is straightforward, but mocking file downloads exposes a different set of assumptions: the response is a binary stream, the headers carry as much of the contract as the body, and clients behave differently depending on content length, encoding, and whether the...

Source: [Dev.to](https://dev.to/jeff_pdc/mocking-file-downloads-and-binary-responses-without-faking-them-badly-2eoc)

Sponsored