【发布时间】:2020-01-21 18:15:24
【问题描述】:
为了向 http 服务器发送 PUT 请求,我使用的是 HttpRequest 节点。消息通过 ESQL 计算节点。问题是发送到服务器的消息的内容长度为 0。请求不包含任何数据,尽管用于消息正文的变量有内容。 如何从 esql 代码传递 put http 请求的内容?
esql代码如下:
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = ...;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/plain';
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Bearer ' || … ;
SET OutputRoot.HTTPRequestHeader."Host" = ...';
SET OutputRoot.BLOB = CAST(InputRoot.BLOB.BLOB as char CCSID 1208 Encoding 815);
HTTPRequest节点的配置是
Http设置
HTTP method: PUT
HTTP version 1.1
Enable keep-alive <checked>
Request Timeout: 20
HTTP Proxy Location : <blank>
Follow HTTP redirection: <unchecked>
Advanced:
Use whole input message as request : <un-checked>
Request Message Location in Tree : InputRoot.BLOB
Replace input message with web-service response: <checked>
Generate default HTTP headers : <un-checked>
VALIDATION: None
【问题讨论】:
标签: ibm-integration-bus extended-sql