{"id":13640562,"url":"https://github.com/softwaremill/sttp","last_synced_at":"2026-04-20T19:01:35.865Z","repository":{"id":37406167,"uuid":"95900154","full_name":"softwaremill/sttp","owner":"softwaremill","description":"The Scala HTTP client you always wanted!","archived":false,"fork":false,"pushed_at":"2026-04-13T01:17:33.000Z","size":11708,"stargazers_count":1501,"open_issues_count":38,"forks_count":331,"subscribers_count":36,"default_branch":"master","last_synced_at":"2026-04-13T03:16:55.497Z","etag":null,"topics":["akka-http","asynchronous","cats","client","distributed-tracing","http","http-client","httpclient","interpolator","monix","okhttp","reactive-streams","scala","scalaz","synchronous","uri","zipkin","zipkin-brave"],"latest_commit_sha":null,"homepage":"https://sttp.softwaremill.com","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softwaremill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-30T15:15:07.000Z","updated_at":"2026-04-13T01:17:36.000Z","dependencies_parsed_at":"2025-12-05T18:00:17.005Z","dependency_job_id":null,"html_url":"https://github.com/softwaremill/sttp","commit_stats":null,"previous_names":[],"tags_count":310,"template":false,"template_full_name":null,"purl":"pkg:github/softwaremill/sttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softwaremill","download_url":"https://codeload.github.com/softwaremill/sttp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsttp/sbom","scorecard":{"id":836372,"data":{"date":"2025-08-11","repo":{"name":"github.com/softwaremill/sttp","commit":"f83d528cb4c2d97d1198d796d11ddc7de00debda"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/scala-steward.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":9,"reason":"Found 28/30 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:129: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:148: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/scala-steward.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/softwaremill/sttp/scala-steward.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:83"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T19:09:23.140Z","repository_id":37406167,"created_at":"2025-08-23T19:09:23.140Z","updated_at":"2025-08-23T19:09:23.140Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32061251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akka-http","asynchronous","cats","client","distributed-tracing","http","http-client","httpclient","interpolator","monix","okhttp","reactive-streams","scala","scalaz","synchronous","uri","zipkin","zipkin-brave"],"created_at":"2024-08-02T01:01:12.359Z","updated_at":"2026-04-20T19:01:35.859Z","avatar_url":"https://github.com/softwaremill.png","language":"Scala","readme":"![sttp](https://github.com/softwaremill/sttp/raw/master/banner.png)\n\n[![Ideas, suggestions, problems, questions](https://img.shields.io/badge/Discourse-ask%20question-blue)](https://softwaremill.community/c/sttp-client)\n[![CI](https://github.com/softwaremill/sttp/workflows/CI/badge.svg)](https://github.com/softwaremill/sttp/actions?query=workflow%3ACI+branch%3Amaster)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.softwaremill.sttp.client4/core_3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.softwaremill.sttp.client4/core_3)\n\n# The Scala HTTP client you always wanted!\n\n## Welcome!\n\nsttp client is an open-source HTTP client for Scala, supporting various approaches to writing Scala code: synchronous (direct-style), `Future`-based, and using functional effect systems (cats-effect, ZIO, Monix, Kyo, scalaz).\n\nThe library is available for Scala 2.12, 2.13 and 3. Supported platforms are the JVM (Java 11+), Scala.JS and Scala Native.\n\nHere's a quick example of sttp client in action, runnable using [scala-cli](https://scala-cli.virtuslab.org):\n\n```scala\n//\u003e using dep com.softwaremill.sttp.client4::core:4.0.23\n\nimport sttp.client4.quick.*\n\n@main def run(): Unit =\n  println(quickRequest.get(uri\"http://httpbin.org/ip\").send())\n```\n\nsttp client addresses common HTTP client use cases, such as interacting with JSON APIs (with automatic serialization of request bodies and deserialization of response bodies), uploading and downloading files, submitting form data, handling multipart requests, and working with WebSockets.\n\nThe driving principle of sttp client's design is to provide a clean, programmer-friendly API to describe HTTP requests, along with response handling. This ensures that resources, such as HTTP connections, are used safely, also in the presence of errors.\n\nsttp client integrates with a number of lower-level Scala and Java HTTP client implementations through backends (using Java's `HttpClient`, Akka HTTP, Pekko HTTP, http4s, OkHttp, Armeria), offering a wide range of choices when it comes to protocol support, connectivity settings and programming stack compatibility. \n\nAdditionally, sttp client seamlessly integrates with popular libraries for JSON handling (e.g., circe, uPickle, jsoniter, json4s, play-json, ZIO Json), logging, metrics, and tracing (e.g., slf4j, scribe, OpenTelemetry, Prometheus). It also supports streaming libraries (e.g., fs2, ZIO Streams, Akka Streams, Pekko Streams) and provides tools for testing HTTP interactions.\n\nSome more features: URI interpolation, a self-managed backend, and type-safe HTTP error/success representation, are demonstrated by the below example:\n\n```scala\n//\u003e using dep com.softwaremill.sttp.client4::core:4.0.23\n\nimport sttp.client4.*\n\n@main def sttpDemo(): Unit =\n  val sort: Option[String] = None\n  val query = \"http language:scala\"\n\n  // the `query` parameter is automatically url-encoded\n  // `sort` is removed, as the value is not defined\n  val request = basicRequest.get(\n    uri\"https://api.github.com/search/repositories?q=$query\u0026sort=$sort\")\n\n  val backend = DefaultSyncBackend()\n  val response = request.send(backend)\n\n  // response.header(...): Option[String]\n  println(response.header(\"Content-Length\")) \n\n  // response.body: read into an Either[String, String] to indicate failure or success \n  println(response.body)\n```\n\nBut that's just a small glimpse of sttp client's features! For more examples, see the [usage examples](https://sttp.softwaremill.com/en/latest/examples.html). \n\n## Documentation\n\nsttp (v4) documentation is available at [sttp.softwaremill.com](https://sttp.softwaremill.com).\n\nsttp (v3) documentation is available at [sttp.softwaremill.com/en/v3](https://sttp.softwaremill.com/en/v3).\n\nsttp (v2) documentation is available at [sttp.softwaremill.com/en/v2](https://sttp.softwaremill.com/en/v2).\n\nsttp (v1) documentation is available at [sttp.softwaremill.com/en/v1](https://sttp.softwaremill.com/en/v1).\n\nscaladoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client4/core_3/4.0.23)\n\n## Quickstart with scala-cli\n\nAdd the following directive to the top of your scala file to add the core sttp dependency:\nIf you are using [scala-cli](https://scala-cli.virtuslab.org), you can quickly start experimenting with sttp by copy-pasting the following:\n\n```\n//\u003e using dep \"com.softwaremill.sttp.client4::core:4.0.23\"\nimport sttp.client4.quick.*\nquickRequest.get(uri\"http://httpbin.org/ip\").send()\n```\n\nThe `quick` package import brings in the sttp API and a pre-configured, global synchronous backend instance.\n\n## Quickstart with Ammonite\n\nSimilarly, using [Ammonite](http://ammonite.io):\n\n```scala\nimport $ivy.`com.softwaremill.sttp.client4::core:4.0.23`\nimport sttp.client4.quick.*\nquickRequest.get(uri\"http://httpbin.org/ip\").send()\n```\n\n## Quickstart with sbt\n\nAdd the following dependency:\n\n```scala\n\"com.softwaremill.sttp.client4\" %% \"core\" % \"4.0.23\"\n```\n\nThen, import:\n\n```scala\nimport sttp.client4.*\n```\n\nType `basicRequest.` and see where your IDE’s auto-complete gets you!\n\n## Other sttp projects\n\nsttp is a family of Scala HTTP-related projects, and currently includes:\n\n* sttp client: this project\n* [sttp tapir](https://github.com/softwaremill/tapir): rapid development of self-documenting APIs\n* [sttp model](https://github.com/softwaremill/sttp-model): simple HTTP model classes (used by client \u0026 tapir)\n* [sttp shared](https://github.com/softwaremill/sttp-shared): shared web socket, FP abstractions, capabilities and streaming code.\n* [sttp apispec](https://github.com/softwaremill/sttp-apispec): OpenAPI, AsyncAPI and JSON Schema models.\n* [sttp openai](https://github.com/softwaremill/sttp-openai): Scala client wrapper for OpenAI and OpenAI-compatible APIs. Use the power of ChatGPT inside your code!\n\n## Contributing\n\nIf you have a question, suggestion, or hit a problem, feel free to ask on our [discourse forum](https://softwaremill.community/c/sttp-client)!\n\nOr, if you encounter a bug, something is unclear in the code or documentation, don’t hesitate and open an issue on GitHub.\n\nWe are also always looking for contributions and new ideas, so if you’d like to get into the project, check out the [open issues](https://github.com/softwaremill/sttp/issues), or post your own suggestions!\n\nNote that running the default `compile` and `test` tasks will build all of the JVM, Native and JS backends, and is likely to run out of memory, or to encounter missing native dependencies. If you'd like to run compilation/tests using *only* the JVM backend, run: `sbt \"compileScoped 3 JVM\"` or `sbt \"testScoped 3 JVM\"`.\n\nWhen you have a PR ready, take a look at our [\"How to prepare a good PR\" guide](https://softwaremill.community/t/how-to-prepare-a-good-pr-to-a-library/448). Thanks! :)\n\n### Importing into IntelliJ\n\nBy default, when importing to IntelliJ or Metals, only the Scala 2.13/JVM subprojects will be imported. This is controlled by the `ideSkipProject` setting in `build.sbt` (inside `commonSettings`).\n\nIf you'd like to work on a different platform or Scala version, simply change this setting temporarily so that the correct subprojects are imported. For example:\n\n```\n// import only Scala 2.13, JS projects\nideSkipProject := (scalaVersion.value != scala2_13) || !thisProjectRef.value.project.contains(\"JS\")\n\n// import only Scala 3, JVM projects\nideSkipProject := (scalaVersion.value != scala3) || thisProjectRef.value.project.contains(\"JS\") || thisProjectRef.value.project.contains(\"Native\"),\n\n// import only Scala 2.13, Native projects\nideSkipProject := (scalaVersion.value != scala2_13) || !thisProjectRef.value.project.contains(\"Native\")\n```\n\n### Modifying documentation\n\nThe documentation is typechecked using [mdoc](https://scalameta.org/mdoc/). The sources for the documentation exist in `docs`. Don't modify the generated documentation in `generated-docs`, as these files will get overwritten!\n\nWhen generating documentation, it's best to set the version to the current one, so that the generated doc files don't include modifications with the current snapshot version. \n\nThat is, in sbt run: `set ThisBuild/version := \"4.0.23\"`, before running `mdoc` in `docs`.\n\n### Testing the Scala.JS backend\n\nIn order to run tests against JS backend you will need to install [Google Chrome](https://www.google.com/chrome/).\n\n### Building \u0026 testing the scala-native backend\n\nBy default, sttp-native will **not** be included in the aggregate build of the root project. To include it, define the `STTP_NATIVE` environmental variable before running sbt, e.g.:\n\n```\nSTTP_NATIVE=1 sbt\n```\n\nYou might need to install some additional libraries, see the [scala native](http://www.scala-native.org/en/latest/user/setup.html) documentation site. On macos, you might additionally need:\n\n```\nln -s /usr/local/opt/openssl/lib/libcrypto.dylib /usr/local/lib/\nln -s /usr/local/opt/openssl/lib/libssl.dylib /usr/local/lib/\n```\n\n## Commercial Support\n\nWe offer commercial support for sttp and related technologies, as well as development services. [Contact us](https://softwaremill.com) to learn more about our offer!\n\n## Copyright\n\nCopyright (C) 2017-2025 SoftwareMill [https://softwaremill.com](https://softwaremill.com).\n","funding_links":[],"categories":["HTTP","Scala","Web Development","Table of Contents","网络编程"],"sub_categories":["HTTP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwaremill%2Fsttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftwaremill%2Fsttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwaremill%2Fsttp/lists"}