Fix Response.mimeType extension

master
Koitharu 1 year ago
parent f86d31f811
commit 326a3f78b2
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -17,8 +17,9 @@ public suspend fun Call.await(): Response = suspendCancellableCoroutine { contin
} }
public val Response.mimeType: String? public val Response.mimeType: String?
get() = header("content-type")?.nullIfEmpty() get() = header("content-type")?.substringBefore(';')?.trim()?.nullIfEmpty()?.lowercase()
@Deprecated("")
public val Response.contentDisposition: String? public val Response.contentDisposition: String?
get() = header("Content-Disposition") get() = header("Content-Disposition")

Loading…
Cancel
Save