I am having a map Map[String, String] in scala and it is set in the session
I have to pass this map as request body of POST call
.body(StringBody("""{${myMap}}""")).asJSON
This is giving 400 Bad request
on Debugging, I found out the request body is being sent as:
{ “key1” → value1, “key2” → value2}
But, request body should have format like below to work.
{ “key1” : “value1”, “key2” : “value2”}