Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<flow name="getStockInfo">
<http:listener path="stock" method="GET" config-ref="httpListener">
<http:response>
<http:body>
<![CDATA[
%dw 2.0
output application/json
---
{
"ticker": attributes.queryParams.ticker,
"price": vars.price as Number,
"variation": vars.variation as Number
}
]]>
</http:body>
</http:response>
</http:listener>
<http:request path="price" config-ref="httpRequester" target="price">
<http:query-params>#[{'ticker': attributes.queryParams.ticker}]</http:query-params>
</http:request>
<http:request path="variation" config-ref="httpRequester" target="price">
<http:query-params>#[{'ticker': attributes.queryParams.ticker}]</http:query-params>
</http:request>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.