Scala Request Sttp
It took me an entire workday to figure out how to make an API request to a server that responds with Content-Encoding: identity using the STTP client.
It seems that the STTP client always tries to decompress the server’s response.
However, the backend (in this case, a Microsoft API) ignores the Accept-Encoding settings in the header.
The solution to this issue was to add .disableAutoDecompression to the client settings.
You can find the final working code snippet below: