Reputation: 609
I'm trying to send form params using WSClient. My first approach is putting all parameters inside a Map:
val params = Map(
"param1" -> s"${config.param1}",
"param2" -> s"${config.param2}"
)
ws.url(s"${config.host}").post(params).map { response =>
response.json.as[MyResponse]
}
It this the right way to do it?
Upvotes: 0
Views: 264
Reputation: 5315
According to the documentation, the entity must be given as a Map[String, Seq[String]]
.
Upvotes: 2