Derk-Jan Karrenbeld
11/02/2018, 12:18 AMHttpClient
and change the decode function to
private fun decode(stream: InputStream, encoding: String): InputStream {
return when (encoding) {
"gzip" -> GZIPInputStream(stream)
"deflate" -> InflaterInputStream(stream)
"identity" -> stream
"chunked" -> stream
"" -> stream
else -> throw UnsupportedOperationException("Decoding $encoding is not supported. $SUPPORTED_DECODING are.")
}
}