mirror of
https://github.com/tursom/TursomServer.git
synced 2025-03-31 14:40:40 +08:00
update
This commit is contained in:
parent
9c0b467445
commit
eecc290d7a
@ -139,8 +139,9 @@ object AsyncHttpRequest {
|
||||
url: String,
|
||||
param: Map<String, String>? = null,
|
||||
headers: Map<String, String>? = null
|
||||
): String =
|
||||
getStr(url, param, headers, defaultClient)
|
||||
): String {
|
||||
return getStr(url, param, headers, defaultClient)
|
||||
}
|
||||
|
||||
@Suppress("BlockingMethodInNonBlockingContext")
|
||||
suspend fun getStr(
|
||||
@ -148,7 +149,10 @@ object AsyncHttpRequest {
|
||||
param: Map<String, String>? = null,
|
||||
headers: Map<String, String>? = null,
|
||||
client: OkHttpClient
|
||||
): String = get(url, param, headers, client).body()!!.string()
|
||||
): String {
|
||||
val response = get(url, param, headers, client)
|
||||
return response.body()!!.string()
|
||||
}
|
||||
|
||||
@Suppress("BlockingMethodInNonBlockingContext")
|
||||
private suspend fun postStr(
|
||||
|
Loading…
Reference in New Issue
Block a user