Uploaded image for project: 'CRISP'
  1. CRISP
  2. CRISP-23

Support POST method in resolving/finding resources/binaries

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Labels:
      None
    • Similar issues:

      Description

      At the moment, for example, every method in exchanges is using GET method only. This is limiting because some external API services provide POST method based query APIs, not GET based APIs, sometimes. e.g, ElasticSearch, etc.
      So, I'd like to propose a generic exchange hint argument in ResourceResolver (and ResourceBrokerService accordingly) like the following examples:

          Resource resolve(String absPath, ExchangeHint exchangeHint) throws ResourceException;
          Resource resolve(String absPath, Map<String, Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException;
          // ...

      So, the underlying ResourceResolver implementation can read the extra exchangeHint argument which may include http method name (e.g, "POST", "PUT", "GET", etc. in http-backend), for instance.

      An example code:

              resourceResolver.resolve(absPath,
                                       pathVariables, 
                                       ExchangeHintBuilder.create()
                                           .method("POST")
                                           .request(requestObject)
                                           .build()
                                       );
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wko Woonsan Ko
                Reporter:
                wko Woonsan Ko
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: