Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-10438

Add method attribute to request-map to controll a uri can be called GET or POST only

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 18.12.01
    • Component/s: framework
    • Labels:

      Description

      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:

      <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>
      

      The difference is that we DON'T support method list expression:

      <request-map uri="examples" method="get,post">...</request-map>
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jleroux Jacques Le Roux
              Reporter:
              shi.jinghai Shi Jinghai

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment