-
-
Save joshuakfarrar/0048f6c93808ca7cdf6bba6f52516bed to your computer and use it in GitHub Desktop.
This file contains 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
val scala3Version = "3.1.0" | |
val http4sVersion = "1.0.0-M34" | |
val circeVersion = "0.15.0-M1" | |
lazy val root = project | |
.in(file(".")) | |
.settings( | |
name := "social n' stuff", | |
version := "0.1.0-SNAPSHOT", | |
scalaVersion := scala3Version, | |
libraryDependencies ++= Seq( | |
"com.novocode" % "junit-interface" % "0.11" % "test", | |
"org.typelevel" %% "cats-core" % "2.7.0", | |
"org.typelevel" %% "cats-effect" % "3.3.4", | |
"org.http4s" %% "http4s-ember-client" % http4sVersion, | |
"org.http4s" %% "http4s-circe" % http4sVersion, | |
"org.http4s" %% "http4s-dsl" % http4sVersion | |
) | |
) |
This file contains 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
package gov.dhs.dsa | |
import cats.effect.{IO, IOApp, ExitCode} | |
import cats.implicits._ | |
import org.http4s._ | |
import org.http4s.implicits._ | |
import org.http4s.ember.client._ | |
import org.http4s.client.dsl.io._ | |
import org.http4s.Method._ | |
object Hello extends IOApp { | |
override def run(args: List[String]) = for { | |
test <- EmberClientBuilder.default[IO].build.use { client => | |
client.expect[String](POST(UrlForm( | |
"client_key" -> clientKey, | |
"client_secret" -> clientSecret, | |
"access_token" -> accessToken | |
), | |
uri"")) | |
} | |
_ <- IO { println(test) } | |
} yield ExitCode.Success | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment