Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
✨ Fixing httpclient when cannot transform the body response as text, …
Browse files Browse the repository at this point in the history
…sending empty string as default value (#41)
  • Loading branch information
hernandazevedozup authored Jun 22, 2022
1 parent 158b926 commit 5ddaaf2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DefaultHttpClient(engine: HttpClientEngine? = null): com.zup.nimbus.core.n
val response = doRequest(request)
return ServerDrivenResponse(
response.status.value,
response.bodyAsText(),
runCatching { response.bodyAsText() }.getOrDefault(""),
buildResponseHeaders(response.headers),
response.body()
)
Expand Down

0 comments on commit 5ddaaf2

Please sign in to comment.