getTextBody

abstract fun getTextBody(scope: CoroutineScope): Deferred<String>

异步将响应体作为文本读取。

它会根据响应的 Content-Type 头部中的 charset 参数来决定使用何种字符集进行解码。

Return

一个 Deferred 对象,其未来结果是响应体的字符串表示。

Parameters

scope

执行此异步操作的协程作用域。