bdawg.io
08/02/2018, 10:14 PMapplication/x-www-form-urlencoded
strings from a map?orangy
bdawg.io
08/02/2018, 10:21 PMcall.respond(401, mapOf(
"error" to "invalid_request",
"error_description" to "client_id is missing"
).toFormUrlEncoded())
orangy
bdawg.io
08/02/2018, 10:26 PMorangy
orangy
bdawg.io
08/02/2018, 10:51 PMorangy
Deactivated User
08/03/2018, 6:39 AMList<Pair<String, String>>
, so you have first to convert the map into a list of pairs. Something like:
call.respond(401, mapOf(
"error" to "invalid_request",
"error_description" to "client_id is missing"
).toList().formUrlEncode())
or:
Parameters.build {
append("error", "invalid_request")
append("error_description", "client_id is missing")
}.formUrlEncode()
Edit: updated the documentation to reflect this and make it easier to discover: https://github.com/ktorio/ktorio.github.io/commit/f5d5039bdfe8387312e7e10633654fe66c334359
Edit2: just noticed that you solved this already in the next thread 🙂 so just ignore this
Edit3: documented what you commented in the next thread too: https://github.com/ktorio/ktorio.github.io/commit/4c224a474811778e930862b1c670851e9bd5e8b6