2016-06-07 119 views
1

我已经做了一个API,我想访问一个邮政电话。我做的壶以下转变:enter image description here如何在pentaho-spoon的post调用中传递参数?

与PARAMS场中生成行作为步骤:

enter image description here

和REST客户步配置为:

enter image description here

,但我在服务器端我的post调用中无法获得任何参数。如果我用Python语言编写一个简单的电话后如:

import requests 

url = "http://10.131.70.73:5000/searchByLatest" 

payload = {'search_query': 'donald trump', 'till_date': 'Tuesday, 7 June 2016 at 10:40'} 

r = requests.post(url, params=payload) 
print(r.text) 
print(r.status_code) 

我能够通过request.args.get("search_query")在烧瓶中的客户端来获取参数。如何在水壶中进行等效POST调用?

回答

1

我终于自己找到了解决方案。描述生成行领域:

enter image description here

,并在REST客户端步骤的参数选项卡中,我们应该得到相同的字段:

enter image description here

运行完美!