Note that there are some explanatory texts on larger screens.

plurals
  1. POMissing parameters with RESTful request when upgrading to Grails 2.3.0
    text
    copied!<p>I am using Grails with RESTful to develop my web application. Everything works fine, till I upgrade my application to Grails 2.3. Here is my UrlMappings: I still send request, submit or do some other things normally, but in POST, PUT requests, the parameters are missing. Server just recognize only the parameters I put on the URL directly, but the remain I enclose in form or model when submit cannot be found in the "params" variable. He is my UrlMappings:</p> <pre><code>class UrlMappings { static mappings = { "/$controller/$action?/$id?"{ constraints {} } name apiSingle: "/api/$controller/$id"(parseRequest:true){ action = [GET: "show", PUT: "update", DELETE: "delete"] constraints { id(matches:/\d+/) } } name apiCollection: "/api/$controller"(parseRequest:true){ action = [GET: "list", POST: "save"] } name api2: "/api/$controller/$action"(parseRequest:true) name api3: "/api/$controller/$action/$id"(parseRequest:true) "/"(view:"/welcome") "500"(view:'/error') } } </code></pre> <p>I have read the latest document of Grails 2.3, at <a href="http://grails.org/doc/latest/guide/theWebLayer.html#restfulMappings">http://grails.org/doc/latest/guide/theWebLayer.html#restfulMappings</a><br> but I think it is not clear. I have tried it follow the documentation but have no result. And there are no any sample about using Grails 2.3 with RESTful for me to refer.<br> How can I make it work normally as before, and can access all parameter values in REST request? Thank you so much!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload