A clean, type-safe HTTP client for Scala supporting synchronous, Future-based, and functional effect system programming styles.
sttp client is an open-source HTTP client library for Scala that provides a clean, type-safe API for making HTTP requests and handling responses. It addresses common use cases like interacting with JSON APIs, uploading/downloading files, submitting form data, handling multipart requests, and working with WebSockets. The library supports multiple Scala programming styles, including synchronous, Future-based, and functional effect systems.
Scala developers building applications that require HTTP client functionality, especially those working with JSON APIs, streaming data, or needing integration with functional effect systems like cats-effect or ZIO.
Developers choose sttp client for its clean, programmer-friendly API, extensive backend and library integrations, and support for multiple Scala paradigms and platforms. Its type-safe design and focus on safe resource management make it a reliable choice for production applications.
The Scala HTTP client you always wanted!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates with multiple lower-level HTTP implementations like Java's HttpClient, Akka HTTP, and http4s, offering flexibility in protocol support and stack compatibility, as highlighted in the README's backend support list.
Seamlessly works with popular JSON libraries such as circe and play-json for automatic serialization and deserialization, simplifying API interactions without manual parsing.
Supports synchronous, Future-based, and functional effect systems including cats-effect and ZIO, catering to diverse Scala coding styles, as emphasized in the project description.
Provides URI construction with automatic URL encoding through uri"" interpolation, reducing common errors in URL building with compile-time checks, demonstrated in the example code.
Requires manual backend instantiation and configuration (e.g., DefaultSyncBackend()), adding boilerplate and complexity compared to auto-configured or simpler HTTP clients.
Maintains separate documentation sites for v1, v2, v3, and v4, which can lead to confusion and indicates frequent breaking changes between major versions.
Full project builds may run out of memory, and testing requires specific setups for Scala.JS and Scala Native, as noted in the contributing section, adding to development friction.