Join the chat at Build Status Maven Central Dependencies

The Scala HTTP client that you always wanted!

sttp is an open-source library which provides a clean, programmer-friendly API to define HTTP requests and execute them using one of the wrapped backends, such as akka-http, async-http-client or OkHttp.

import com.softwaremill.sttp._

val sort: Option[String] = None
val query = "http language:scala"

// the `query` parameter is automatically url-encoded
// `sort` is removed, as the value is not defined
val request = sttp.get(uri"$query&sort=$sort")
implicit val backend = HttpURLConnectionBackend()
val response = request.send()

// response.header(...): Option[String]

// response.unsafeBody: by default read into a String 


sttp documentation is available at

You can also take a look at the introductory blog and its follow-up.

Quickstart with Ammonite

If you are an Ammonite user, you can quickly start experimenting with sttp by copy-pasting the following:

import $ivy.`com.softwaremill.sttp::core:1.1.13`
import com.softwaremill.sttp._
implicit val backend = HttpURLConnectionBackend()

Quickstart with sbt

Add the following dependency:

"com.softwaremill.sttp" %% "core" % "1.1.13"

Then, import:

import com.softwaremill.sttp._

Type sttp. and see where your IDE’s auto-complete gets you!


If you have a question, or hit a problem, feel free to ask on our gitter channel!

Or, if you encounter a bug, something is unclear in the code or documentation, don’t hesitate and open an issue on GitHub.

We are also always looking for contributions and new ideas, so if you’d like to get into the project, check out the open issues, or post your own suggestions!