androidx migration
I DID THIS ONE MYSELF WITHOUT TAKING IT FROM THE OTHER FORKS YEEEEEEEEEEET
This commit is contained in:
@@ -7,9 +7,9 @@ import okhttp3.ResponseBody
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
fun Response.interceptAsHtml(block: (Document) -> Unit): Response {
|
||||
val body = body()
|
||||
if (body?.contentType()?.type() == "text"
|
||||
&& body.contentType()?.subtype() == "html") {
|
||||
val body = body
|
||||
if (body?.contentType()?.type == "text"
|
||||
&& body.contentType()?.subtype == "html") {
|
||||
val bodyString = body.string()
|
||||
val rebuiltResponse = newBuilder()
|
||||
.body(ResponseBody.create(body.contentType(), bodyString))
|
||||
|
||||
Reference in New Issue
Block a user