package nova.monadic_sfx.http.requests import nova.monadic_sfx.AppTypes import nova.monadic_sfx.AppTypes.HttpBackend import monix.eval.Task import sttp.client._ import sttp.client.circe._ import io.circe.generic.auto._ import nova.monadic_sfx.models._ class DummyRequest(backend: HttpBackend) extends AppTypes { private implicit val _backend = backend def send() = { Task .suspend( (for { req <- basicRequest .get(uri"https://httpbin.org/get") .response(asJson[HttpBinResponse]) .send() } yield println(req)) >> Task(println(Thread.currentThread().getName())) ) } }