Getting params from JQuery POST in Java Play Framework -



Getting params from JQuery POST in Java Play Framework -

i trying retrieve params post request java play framework (2.3.x).

here post request:

$.post( "/some/endpoint", { "thingid": 12345, "otherthingid": 1234 }, function (data) { /* stuff. */ }, "json" );

and in controller:

public static result someendpoint() { dynamicform params = form.form().bindfromrequest(); system.out.println(params.get("thingid")); system.out.println(params.get("otherthingid")); }

unfortunately, never of params trying send. know doing wrong?

thanks!

all can doing same extract info out of post.

did tried clean compile project in sbt command line ?

do have route :

post /some/endpoint controllers.mycontroller.someendpoint()

java jquery post playframework playframework-2.3

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -