scala - Play framework: empty body in post request -
helo! have following code:
def foo = action { request => ok(request.body.astext.getorelse("no body")) }
in frontend have form this:
<form action="@controllers.routes.application.foo()" method="post"> <input name="name" type="text"> <input name="surname" type="text"> <button type="submit"> </form>
if fill form , click submit, gives me result: no body. if add brakepoint in debugger ok(..), shows me, body not emty.
anycontentasformurlencoded(map(name -> arraybuffer(123), surname -> arraybuffer(123)))
why, doesn't give me body text, or else, , how can them?
given form , debugging output, should using asformurlencoded
.
Comments
Post a Comment