2017-09-05 59 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