Most of sttp' backends accept a customizeRequest function, which allows the user to modify the request prior to sending.
For example, in AkkaHttpBackend:
I propose to add support for customizeResponse function, which would do the similar thing for responses - modify the response prior to further processing.
Most of sttp' backends accept a
customizeRequest
function, which allows the user to modify the request prior to sending. For example, inAkkaHttpBackend
:https://github.com/softwaremill/sttp/blob/a29516923b59f0b06d75f5670f25aa9b2803ea8a/akka-http-backend/src/main/scala/sttp/client/akkahttp/AkkaHttpBackend.scala#L395
I propose to add support for
customizeResponse
function, which would do the similar thing for responses - modify the response prior to further processing.In
AkkaHttpBackend
, it could look like this:My original motivation for this is to be able to call
response.mapEntity(_.withoutSizeLimit)
on certain akka-http responses.