How to call entity(as[String]) from postman scala spray

109 Views Asked by At

I am new to scala and spray. I'm trying to hit POST api from Postman. From front-end it is working but how can I hit from postman.

POST /api/admin/users/:userId/update-role
path("update-role") {
                  postCsrf {
                    entity(as[String]) { role => ctx =>
                      // TODO: This is not the optimal way to do this, but with the 2.4 time crunch, it's going in as tech debt.
                      }
                } ~

Request from Postman

Request from Front-end

0

There are 0 best solutions below