Commit 2b1725b7 authored by Him188's avatar Him188

Add e.printStackTrace()

parent f0702a7e
...@@ -5,9 +5,11 @@ package net.mamoe.mirai.utils ...@@ -5,9 +5,11 @@ package net.mamoe.mirai.utils
import io.ktor.client.HttpClient import io.ktor.client.HttpClient
import io.ktor.client.engine.cio.CIO import io.ktor.client.engine.cio.CIO
import io.ktor.client.request.HttpRequestBuilder import io.ktor.client.request.HttpRequestBuilder
import io.ktor.client.request.get
import io.ktor.http.ContentType import io.ktor.http.ContentType
import io.ktor.http.content.OutgoingContent import io.ktor.http.content.OutgoingContent
import kotlinx.coroutines.io.ByteWriteChannel import kotlinx.coroutines.io.ByteWriteChannel
import kotlinx.io.core.ByteReadPacket
import kotlinx.io.core.Input import kotlinx.io.core.Input
import java.io.DataInput import java.io.DataInput
import java.io.EOFException import java.io.EOFException
...@@ -55,7 +57,11 @@ actual fun solveIpAddress(hostname: String): String = InetAddress.getByName(host ...@@ -55,7 +57,11 @@ actual fun solveIpAddress(hostname: String): String = InetAddress.getByName(host
actual fun localIpAddress(): String = InetAddress.getLocalHost().hostAddress 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( internal actual fun HttpRequestBuilder.configureBody(
inputSize: Long, inputSize: Long,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment