sttp
sttp copied to clipboard
ZIO helper to summon `SttpBackend[Task, Any]`
In our ZIO 2 code we use this pattern a lot
ZIO.serviceWithZIO[SttpBackend[Task, Any]](_.send(...))
Would be nice if there is shortcut like Sttp.send orsomething?
If this is still a pattern in ZIO2, then sure. We used to have SttpClient (https://github.com/softwaremill/sttp/blob/master/async-http-client-backend/zio1/src/main/scala/sttp/client3/asynchttpclient/zio/package.scala#L13-L18), so I guess you're asking for sth similar.
However I thought that now dependencies should be passed with constructors?