[ 
http://www.stripesframework.org/jira/browse/STS-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12153#comment-12153
 ] 

Janne Jalkanen commented on STS-774:
------------------------------------

The list of allowed REST verbs is a bit restrictive: you can't e.g. implement 
HEAD. Neither could you use this to implement a WebDAV server, since it 
introduces several new HTTP verbs.  I'm not even sure why there should be a 
check for the allowed verb in the first place, since if the binding is not 
found, it's an error anyway.

Speaking of errors, I think the code should return a 400 or 405 if there's a 
bad HTTP verb.

> Resolve event handler by HTTP verb (RestBinding)
> ------------------------------------------------
>
>                 Key: STS-774
>                 URL: http://www.stripesframework.org/jira/browse/STS-774
>             Project: Stripes
>          Issue Type: New Feature
>            Reporter: Evan Leonard
>             Fix For: Release 1.5.5
>
>         Attachments: RestBinding_annotation.patch
>
>
> Attached is a patch that enables one to bind a rest verb to a specific 
> handler in your ActionBean. An example:
> @UrlBinding("/RestAction")
> public class RestActionBean implements ActionBean {
>   @RestBinding("PUT")
>    public Resolution myPutHandler() {
>        log.info("Got a Put");
>        return null;
>    }
> }
> Now if you send a PUT request to "/yourapp/RestAction", it will be routed to 
> the "myPutHandler" method. 
> The patch needs a little review & clean-up before committing. Ben's had at 
> least a quick look at it at this point.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to