Examples by category

The sttp client repository contains a number of how-to guides. If you’re missing an example for your use-case, please let us know by reporting an issue!

Each example is fully self-contained and can be run using scala-cli (you just need to copy the content of the file, apart from scala-cli, no additional setup is required!). Hopefully this will make experimenting with sttp client as frictionless as possible!

Examples are tagged with the stack being used (direct-style, cats-effect, ZIO, Future) and backend implementation

Hello, World!

Backend wrapper

JSON

Logging

Other

Resilience

Streaming

Testing

WebSocket