You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mathieu Lirzin (JIRA)" <ji...@apache.org> on 2018/08/08 09:42:00 UTC
[jira] [Comment Edited] (OFBIZ-10438) Add method attribute to
request-map to controll a uri can be called GET or POST only
[ https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16572935#comment-16572935 ]
Mathieu Lirzin edited comment on OFBIZ-10438 at 8/8/18 9:41 AM:
----------------------------------------------------------------
Since OFBIZ-10485 is closed, I have updated the patches following [~taher] suggestions. In [^OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch] the {{Controller}} class has been renamed to {{ControllerConfig}}. Additionally in [^OFBIZ-10438_0003-Handle-multiple-request-methods.patch] does not depend on {{MultivaluedMap}} anymore, the adapter anonymous class used in {{getRequestMapMap}} is now a proper class, and more tests has been added.
was (Author: mthl):
Since OFBIZ-10485 is closed, I have updated the patches to [~taher] suggestions. In [^OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch] the {{Controller}} class has been renamed to {{ControllerConfig}}. Additionally in [^OFBIZ-10438_0003-Handle-multiple-request-methods.patch] does not depend on {{MultivaluedMap}} anymore, the adapter anonymous class used in {{getRequestMapMap}} is now a proper class, and more tests has been added.
> Add method attribute to request-map to controll a uri can be called GET or POST only
> ------------------------------------------------------------------------------------
>
> Key: OFBIZ-10438
> URL: https://issues.apache.org/jira/browse/OFBIZ-10438
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Trunk
> Reporter: Shi Jinghai
> Assignee: Shi Jinghai
> Priority: Minor
> Attachments: OFBIZ-10438_0001-Add-optional-method-attribute-in-request.patch, OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch, OFBIZ-10438_0003-Handle-multiple-request-methods.patch
>
>
> As discussed in OFBIZ-4274, OFBiz runs doGet method in ControlServlet no matter what request it is.
> I like Mathieu's comment on adding a method attribute to the request-map element, it's almost the same as we implemented in our openapi:
>
> {code:java}
> <request-map uri="examples" method="get">
> <security https="true" auth="true"/>
> <event type="java" path="ExamplesHandlers" invoke="getExamples"/>
> <response name="success" type="view" value="..."/>
> <response name="error" type="view" value="..."/>
> </request-map>
> {code}
> The difference is that we DON'T support method list expression:
> {code:java}
> <request-map uri="examples" method="get,post">...</request-map>
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)