Client backed by sttp.

"org.julienrf" %% "endpoints-sttp-client" % "0.15.0"

API documentation

The Endpoints interpreter is parameterized by an sttp backend of type SttpBackend[R, Nothing], for some type constructor R[_].

The Endpoint[A, B] type is fixed as follows:

type Endpoint[A, B] = A => R[B]

This means that, given the following endpoint definition:

val someResource: Endpoint[Int, String] =
  endpoint(get(path / "some-resource" / segment[Int]()), ok(textResponse))

It can be invoked as follows with the HttpURLConnectionBackend, for instance:

val string: String = someResource(42)