diff --git a/http/src/main/scala/client/HttpClient.scala b/http/src/main/scala/client/HttpClient.scala index 2e7379f..05de319 100644 --- a/http/src/main/scala/client/HttpClient.scala +++ b/http/src/main/scala/client/HttpClient.scala @@ -51,7 +51,7 @@ class HttpClient[F[_]: Effect](c: Client[F], host: String, port: Int) { val request: Request[F] = Request[F](Method.POST, baseUri) - val req = request.withBody(newPerson.asJson) + val req = request.withEntity(newPerson.asJson) c.expect(req) diff --git a/http/src/main/scala/server/HttpServer.scala b/http/src/main/scala/server/HttpServer.scala index c65c73b..27473b7 100644 --- a/http/src/main/scala/server/HttpServer.scala +++ b/http/src/main/scala/server/HttpServer.scala @@ -14,6 +14,7 @@ import org.http4s.dsl.io._ import org.http4s.server.blaze._ import scala.concurrent.ExecutionContext.Implicits.global +import org.http4s.server.blaze.BlazeServerBuilder object HttpServer extends StreamApp[IO] { @@ -23,7 +24,7 @@ object HttpServer extends StreamApp[IO] { ): fs2.Stream[IO, StreamApp.ExitCode] = for { b <- - BlazeBuilder[IO] + BlazeServerBuilder[IO] .bindHttp(HttpConf.port, HttpConf.host) .mountService(httpServices, "/") .serve @@ -32,7 +33,7 @@ object HttpServer extends StreamApp[IO] { ) } yield b - val httpServices = HttpService[IO] { + val httpServices = HttpRoutes.of[IO] { case GET -> Root / "person" => Ok(listPersons) case GET -> Root / "person" / id => Ok(getPerson(PersonId(id))) diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index 5a330c0..f4e311c 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -13,7 +13,7 @@ object ProjectPlugin extends AutoPlugin { lazy val V = new { lazy val freesRPC = "0.15.1" - lazy val http4s = "0.18.26" + lazy val http4s = "0.21.19" lazy val config = "1.4.1" lazy val logback = "1.2.3" lazy val circe = "0.13.0"