I'm using this snippet of code to construct a Uri:
import spray.http.Uri
val authorizeUri =
.withQuery(
"response_type" -> "code",
"client_id" -> "xxx",
"redirect_uri" -> redirectUri.toString)
println(s"authorize uri = ${authorizeUri.toString}")
----
The Uris are being generated, but the redirect_uri query parameter isn't being percent-encoded.
Is there another method I should be using besides .toString() to get the encoded form of the query parameters?
Just to give a bit of context, I'm sending authorizeUri out to a redirect. But when I inspect the response using curl, the redirect_uri parameter in the Location header and body isn't encoded there, either.