okhttp / okhttp3 / ResponseBody / charStream

charStream

fun charStream(): Reader

Returns the response as a character stream.

If the response starts with a Byte Order Mark (BOM), it is consumed and used to determine the charset of the response bytes.

Otherwise if the response has a Content-Type header that specifies a charset, that is used to determine the charset of the response bytes.

Otherwise the response bytes are decoded as UTF-8.