Skip to content

Commit d0cbe5c

Browse files
committed
chore: skip savebody for media client
1 parent cb9f2ff commit d0cbe5c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

shared/src/commonMain/kotlin/dev/suresh/http/HttpClient.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ expect fun httpClient(
115115

116116
expectSuccess = true
117117

118+
// install(SaveBodyPlugin) {
119+
// disabled = true
120+
// }
121+
118122
HttpResponseValidator {
119123
handleResponseExceptionWithRequest { ex, req ->
120124
val resException = ex as? ResponseException ?: return@handleResponseExceptionWithRequest

shared/src/commonMain/kotlin/dev/suresh/http/MediaApiClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ data class MediaApiClient(
6060

6161
suspend fun images() = client.get(ImgRes()).body<List<Image>>()
6262

63-
suspend fun videos() = client.get(VideoRes()).body<List<Video>>()
63+
suspend fun videos() = client.get(VideoRes()) { skipSavingBody() }.body<List<Video>>()
6464

6565
suspend fun multiPart() {
6666
val multipart = client.post(MultiPartRes()).body<MultiPartData>()

0 commit comments

Comments
 (0)