Dynamically change the URI on the tHttpRequest component

One Star

Dynamically change the URI on the tHttpRequest component

I have a project where I need to make a http request but the URI must be dynamically set.
The request is like this:
http://XXXXXX/?xmlreqdoc=<mtn>3155551212</mtn> where the mtn would be different for each request.
Is there a way to pass the URI into the tHttpRequest component?
Community Manager

Re: Dynamically change the URI on the tHttpRequest component

Hi
Yes, you can set a dynamic URI on tHttpRequest, assuming the mtn is read from a file, the job looks like:
tFileInputDelimited--main(row1)--tFlowToIterate---tHttpRequest
on tHttpRequest, set a dynamic URI like:
"http://XXXXXX/?xmlreqdoc=<mtn>"+(String)globalMap.get("row1.columnName")+"</mtn>"
//columnName is a column name on tFileInputDelimited, this column has the mtn data.

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business