update versions

This commit is contained in:
2020-08-18 10:53:53 +06:00
parent 3ab7451b2e
commit fc8c0cfc73
33 changed files with 70 additions and 96 deletions

View File

@@ -31,7 +31,7 @@ repositories {
kotlin {
jvm()
js()
js { browser() }
sourceSets {
commonMain {

View File

@@ -15,7 +15,7 @@ suspend fun <ResultType> HttpClient.uniget(
) = get<ByteArray>(
url
).let {
standardKtorSerialFormat.load(resultDeserializer, it)
standardKtorSerialFormat.decodeFromByteArray(resultDeserializer, it)
}
suspend fun <BodyType, ResultType> HttpClient.unipost(
@@ -23,7 +23,7 @@ suspend fun <BodyType, ResultType> HttpClient.unipost(
bodyInfo: BodyPair<BodyType>,
resultDeserializer: DeserializationStrategy<ResultType>
) = post<ByteArray>(url) {
body = standardKtorSerialFormat.dump(bodyInfo.first, bodyInfo.second)
body = standardKtorSerialFormat.encodeToByteArray(bodyInfo.first, bodyInfo.second)
}.let {
standardKtorSerialFormat.load(resultDeserializer, it)
standardKtorSerialFormat.decodeFromByteArray(resultDeserializer, it)
}