codeconsole commented on PR #16183:
URL: https://github.com/apache/grails-core/pull/16183#issuecomment-5381039627

   > We removed the dispatch actions in Grails 8 already (deprecated in Grails 
7). Is _method just left over from that? I had no idea you could even change 
the method for a form - why wouldn't you either set the form to the intended 
method or just set the 
[formmethod](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formMethod)?
 It seems like _method is from an earlier implementation when there weren't 
built in constructs to change the method in html5.
   
   No, it is for RestfulServiceController and g:form and has always been there. 
 It is used in the scaffolding plugin. 
   
   ```html
   <g:form method="PUT" action="/books">
   ```
   
   ```
   creates 
   <form method="POST" action="/books">
   <input type="hidden" name="_method" value="PUT">
   ```
   
   then HiddenMethodFilter wraps the entire request so the entire filter stack 
(including Spring Security thinks the request  is `PUT /books` instead of `POST 
/books` (what it really is)
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to