Skip to content

Instantly share code, notes, and snippets.

@sproctor
Created March 23, 2022 22:49
Show Gist options
  • Save sproctor/07f81373e633821f3c4c53272e00ac87 to your computer and use it in GitHub Desktop.
Save sproctor/07f81373e633821f3c4c53272e00ac87 to your computer and use it in GitHub Desktop.
val client = HttpClient()
val response = client.post<HttpResponse> {
url("https://$domain/oauth/token")
header("content-type", "application/x-www-form-urlencoded")
body = "grant_type=authorization_code&client_id=$clientId&code_verifier=$verifier" +
"&code=$code&redirect_uri=$encodedRedirectUri"
}
println("response: ${response.readText()}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment