2017-09-05 58 views
0

我想使用由CentraSite 9.7配置的Mediator 9.7虛擬化REST API。使用Centrasite查詢參數的POST方法

對於資源,使用POST方法,我想傳遞json內容和一些查詢參數。 但是,無論是否在資源中或在centrasite的方法中配置參數,查詢參數都不會發送到本地端點。

在GET方法中,查詢參數始終沒有問題地發送。

當我張貼此請求中保

POST http://virtual-wm/v2.0/resource/test?from_date=2017-08-01&to_date=2017-08-31 HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/json 
Authorization: truc 
Content-Length: 14 
Connection: Keep-Alive 
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) 

["data"] 

的本地端點收到此:

POST https://api.services/v2.0/resource/test HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/json 
Authorization: truc 
Content-Length: 14 
Connection: Keep-Alive 
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) 

["data"] 

當然這不是我想要的。 我想即使使用POST方法發送到本地點的查詢參數。

我該如何做到這一點?

回答

0

最後,我發現這個軟件AG的支持(這不是那麼簡單的找到它)

CentraSite - Mediator not handling query string parameters in POST 
Product: CentraSite (INM)  
Version: 9.9  
Last Updated: 31-MAR-2017  
________________________________________ 
Description: 
When invoking a REST virtual service through the Mediator, POST requests are  sent to the backend but without their query string parameters. 
________________________________________ 
Resolution: 
Query parameters for POST method are not supported until version 9.12. 

所以,對於這個問題無解,除非升級到9.12