Last active
June 7, 2019 09:30
-
-
Save adamw/b269bf4960b80be03cc85d8d7f26cd19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SBT dependencies: | |
val sttpVersion = "1.5.19" | |
libraryDependencies += Seq( | |
"com.softwaremill.sttp" %% "core" % sttpVersion, | |
"com.softwaremill.sttp" %% "circe" % sttpVersion, | |
) | |
*/ | |
import com.softwaremill.sttp._ | |
import com.softwaremill.sttp.circe._ | |
import io.circe.generic.auto._ | |
case class Person(name: String, age: Int) | |
val request = sttp | |
.post(uri"http://httpbin.org/post") | |
.body(Person("Mary", 52)) | |
.header("X-Auth", "123") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment