mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-06 18:23:51 +08:00
Add e.printStackTrace()
This commit is contained in:
parent
f0702a7ea9
commit
2b1725b7f4
@ -5,9 +5,11 @@ package net.mamoe.mirai.utils
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
import io.ktor.client.request.HttpRequestBuilder
|
||||
import io.ktor.client.request.get
|
||||
import io.ktor.http.ContentType
|
||||
import io.ktor.http.content.OutgoingContent
|
||||
import kotlinx.coroutines.io.ByteWriteChannel
|
||||
import kotlinx.io.core.ByteReadPacket
|
||||
import kotlinx.io.core.Input
|
||||
import java.io.DataInput
|
||||
import java.io.EOFException
|
||||
@ -55,7 +57,11 @@ actual fun solveIpAddress(hostname: String): String = InetAddress.getByName(host
|
||||
|
||||
actual fun localIpAddress(): String = InetAddress.getLocalHost().hostAddress
|
||||
|
||||
internal actual val Http: HttpClient = HttpClient(CIO)
|
||||
actual val Http: HttpClient get() = HttpClient(CIO)
|
||||
|
||||
suspend fun HttpClient.getURL(url: String): ByteReadPacket {
|
||||
return this.get(url)
|
||||
}
|
||||
|
||||
internal actual fun HttpRequestBuilder.configureBody(
|
||||
inputSize: Long,
|
||||
|
Loading…
Reference in New Issue
Block a user