DEV.co
Open-Source Observability · softwaremill

sttp

sttp is a production-ready Scala HTTP client library supporting multiple concurrency models (synchronous, Future-based, effect systems like cats-effect and ZIO) across JVM, Scala.js, and Scala Native. It provides a type-safe, expressive API with pluggable backends and integrations for JSON, logging, metrics, and tracing.

Source: GitHub — github.com/softwaremill/sttp
1.5k
GitHub stars
332
Forks
Scala
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorysoftwaremill/sttp
Ownersoftwaremill
Primary languageScala
LicenseApache-2.0 — OSI-approved
Stars1.5k
Forks332
Open issues24
Latest releasev4.0.26 (2026-07-08)
Last updated2026-07-08
Sourcehttps://github.com/softwaremill/sttp

What sttp is

sttp abstracts over lower-level HTTP implementations (HttpClient, Akka/Pekko HTTP, http4s, OkHttp, Armeria) via a backend system, supporting Scala 2.12+ and 3.x. It offers URI interpolation, streaming, WebSocket support, and rich integrations with functional effect libraries and serialization frameworks.

Quickstart

Get the sttp source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/softwaremill/sttp.gitcd sttp# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

JSON API integration

Seamless serialization/deserialization with circe, uPickle, jsoniter, play-json, and ZIO Json; automatic error handling via typed response representation.

Polyglot Scala ecosystem projects

Supports multiple concurrency paradigms and effect systems (Future, ZIO, cats-effect, Monix, Kyo, scalaz); single API across JVM, JS, and Native platforms.

Microservices with distributed tracing

Native OpenTelemetry, Zipkin, and Brave integrations; integrates with slf4j, scribe, and Prometheus for observability-first architectures.

Implementation considerations

  • Backend selection (HttpClient, OkHttp, Akka, Pekko, http4s) must align with project dependencies and effect system; misalignment risks version conflicts.
  • Effect system choice (Future, ZIO, cats-effect, Monix) cascades through codebase; change difficult post-adoption.
  • URI interpolation avoids string-based URL bugs but requires scala-cli or Ammonite tooling familiarity for quick experiments.
  • Resource safety is automatic (connection pooling, cleanup) when using recommended backends; custom backends require explicit validation.
  • Multiplatform (JVM/JS/Native) builds require environment setup (Chrome for JS, C toolchain for Native); single-platform projects skip complexity.

When to avoid it — and what to weigh

  • Non-Scala projects — sttp is Scala-first; Java projects should use native JDK HttpClient or dedicated Java clients like OkHttp or Apache HttpComponents.
  • Simple, low-dependency requirements — sttp introduces dependency graph complexity via backends and effect system choices; consider raw HttpClient for minimal setup.
  • Performance-critical synchronous workloads at scale — While functional, synchronous backend overhead may not match raw Java HttpClient; benchmark against use case before adopting.
  • Legacy Java 8-10 environments — Requires Java 11+; unsuitable for older runtime constraints without upgrade path.

License & commercial use

Apache License 2.0 (Apache-2.0). Permissive OSI-approved license allowing commercial use, modification, and distribution with notice and liability disclaimer. No copyleft restrictions.

Apache-2.0 permits commercial use without restriction. Attribution and license inclusion required in distributions. SoftwareMill offers commercial support (referenced in README but terms not specified in provided data); evaluate support terms independently if production SLA required.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No explicit security audit or CVE history mentioned in data. Standard HTTPS/TLS support via backends (HttpClient, OkHttp, etc.); defer to backend implementation for cryptographic strength. Connection pooling and resource cleanup prevent resource exhaustion. No secrets management built-in; handle credential injection externally (env vars, vaults). Dependency supply-chain risk present; audit transitive dependencies (Akka, Pekko, http4s versions) per organizational policy.

Alternatives to consider

Java HttpClient (java.net.http)

Built-in, zero-dependency, Java 11+. Suitable for simple use cases; lacks Scala ecosystem integration and functional effect support.

Apache HttpComponents (HttpClient 5.x)

Mature, feature-rich, pure Java. Better for non-Scala JVM projects; heavier dependency, no native effect system support.

Akka HTTP / Pekko HTTP

Full-stack HTTP frameworks with server/client; more opinionated and heavyweight than sttp's client-focused abstraction.

Software development agency

Build on sttp with DEV.co software developers

Our Scala experts can help architect HTTP integration strategies, evaluate backend choices, and optimize for your effect system. Contact us to discuss your API layer requirements.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

sttp FAQ

Can I use sttp with ZIO/cats-effect without adopting the entire effect system?
Yes. sttp supports multiple effect models side-by-side via backends. Use Future or sync backend for non-effect codebases; adopt ZIO/cats-effect backend only in modules requiring it.
Does sttp work on Scala.js and Scala Native?
Yes. Full platform support (JVM, JS, Native) with platform-specific backend implementations. Browser constraints apply to JS (e.g., CORS), and Native requires C toolchain and native libraries (e.g., OpenSSL).
What's the overhead of sttp's abstraction vs. raw OkHttp/HttpClient?
Minimal. sttp is a thin DSL over backends; performance is backend-dependent. Choose backend matching your throughput requirements; benchmark before optimizing.
How do I handle authentication and secrets?
sttp does not manage secrets. Inject credentials via request headers, query params, or external secret management (e.g., HashiCorp Vault, env vars). Backends handle HTTPS transport security.

Software developers & web developers for hire

From first prototype to production, DEV.co delivers software development services around tools like sttp. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source observability and beyond.

Ready to assess sttp for your Scala project?

Our Scala experts can help architect HTTP integration strategies, evaluate backend choices, and optimize for your effect system. Contact us to discuss your API layer requirements.