mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-12-14 11:56:15 +08:00
Update src/main/java/ext/Http.kt
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ fun HttpRequest.Builder.post(body: Any? = null) = this.POST(when (body) {
|
||||
is ByteArray -> HttpRequest.BodyPublishers.ofByteArray(body)
|
||||
is String -> HttpRequest.BodyPublishers.ofString(body)
|
||||
is HttpRequest.BodyPublisher -> body
|
||||
else -> throw Exception("Unsupported body type")
|
||||
else -> throw IllegalArgumentException("Unsupported body type")
|
||||
}).send()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user