Using as an sttp clientΒΆ
Add the dependency:
"com.softwaremill.tapir" %% "tapir-sttp-client" % "0.9.0"
To make requests using an endpoint definition using sttp, import:
import tapir.client.sttp._
This adds the toSttpRequest(Uri)
extension method to any Endpoint
instance which, given the given base URI returns a
function:
[I as function arguments] => Request[Either[E, O], Nothing]
After providing the input parameters, the result is a description of the request to be made, which can be further customised and sent using any sttp backend.
See the runnable example for example usage.