File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
app/src/commonMain/kotlin/com/crosspaste/net Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ class PasteClient(
26
26
27
27
private val client: HttpClient =
28
28
HttpClient (CIO ) {
29
+ install(DefaultRequest ) {
30
+ header(HttpHeaders .AcceptEncoding , " identity" )
31
+ }
29
32
install(HttpTimeout ) {
30
33
requestTimeoutMillis = 1000
31
34
}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class PullClientApi(
65
65
): ClientApiResult =
66
66
if (response.status.value == 200 ) {
67
67
logger.debug { " Success to pull $api " }
68
- SuccessResult (response.rawContent )
68
+ SuccessResult (response.bodyAsChannel() )
69
69
} else {
70
70
val failResponse = response.body<FailResponse >()
71
71
createFailureResult(
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class ClientDecryptPlugin(
38
38
return @intercept
39
39
}
40
40
logger.debug { " client decrypt $appInstanceId " }
41
- val byteReadChannel: ByteReadChannel = it.rawContent
41
+ val byteReadChannel: ByteReadChannel = it.bodyAsChannel()
42
42
43
43
val contentType = it.call.response.contentType()
44
44
You can’t perform that action at this time.
0 commit comments