Fix Response.mimeType extension

This commit is contained in:
2024-12-19 14:57:44 +02:00
parent f86d31f811
commit 326a3f78b2

View File

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