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
Post a Comment