diff --git a/http4sClient/src/main/scala/HttpRpcTransport.scala b/http4sClient/src/main/scala/HttpRpcTransport.scala index 0d28b572..f5e939f3 100644 --- a/http4sClient/src/main/scala/HttpRpcTransport.scala +++ b/http4sClient/src/main/scala/HttpRpcTransport.scala @@ -14,7 +14,7 @@ case class HttpRequestConfig( ) { def toRequest[F[_]](requestPath: List[String], entityBody: EntityBody[F]): Request[F] = Request[F]( method = Method.POST, - uri = baseUri / requestPath.mkString("/"), + uri = requestPath.foldLeft(baseUri)(_ / _), httpVersion = httpVersion, headers = headers, body = entityBody, diff --git a/http4sServer/src/main/scala/HttpRpcRoutes.scala b/http4sServer/src/main/scala/HttpRpcRoutes.scala index a1985e45..1f361773 100644 --- a/http4sServer/src/main/scala/HttpRpcRoutes.scala +++ b/http4sServer/src/main/scala/HttpRpcRoutes.scala @@ -8,7 +8,7 @@ import org.http4s.dsl.Http4sDsl import fs2.Stream import sloth.{Router, ServerFailure} -class HttpRpcRoutes { +object HttpRpcRoutes { def apply[PickleType: EntityDecoder[F, *]: EntityEncoder[F, *], F[_]: Concurrent]( router: Router[PickleType, F],