Uploaded image for project: '[Read Only] - CRISP'
  1. [Read Only] - CRISP
  2. CRISP-23

Support POST method in resolving/finding resources/binaries

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.1.0
    • None

    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

              wko Woonsan Ko (Inactive)
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: