Using tHttpRequest Component basics

One Star

Using tHttpRequest Component basics

Hello and thanks in advance.
I am not exactly sure how to use the tHttpRequest Component for MethodSmiley TongueOST. I checked the Talend User Documentation (F1), but it did not have the needed details about using POST.
Each row of my input data has a preformatted querystring or postdata (i.e. field1=1111&field2=1111&field3=1111&field4=1111)
I can't find any documentation on how to get the this string into the URI Field, but I see that there is a field for "post parameters from file."
So, my questions about this component are:
1. How can I use the tHttpRequest component to send 1 request per row?
1. Do files need to be created to pass the Post information or can it use the incoming ROW?
2. How should the File be formatted with POST information?
3. Is the file for 1 httpRequestSmiley TongueOST or can it hold put multiple httpRequestSmiley TongueOST Data. Do I need to create a new file for each httpRequestSmiley TongueOST?
4. Do I need to specify the POST fields in a special way, or should they be concantenated into a formatted "querysting" (i.e field1=1111&field2=1111&field3=1111&field4=1111)
Can you show me the proper way to setup the tHttpRequest Component for MethodSmiley TongueOST for multiple rows of posting information?
Thanks again.
Four Stars

Re: Using tHttpRequest Component basics

1) Assign your parameter to a context before using tHttpRequest in tJavaRow or similar component:
context.currentParameter = field1=1111;
Then in the URI of the component have this:
"localhost:8080/myApp/controller?" + context.currentParameter
2-4) Never used the file feature, can't help here.
One Star

Re: Using tHttpRequest Component basics

I have the same problem here. How can I post XML content via tHttpRequest? Is it posible? I test it by saving the XML content into a file and read it by "Post parameters from file". But the server gets empty content. The XML content is not a soap or xmlrpc request so I can't use this components.
Is tHttpRequest the right solution? Can anyone give a working example, please?
One Star

Re: Using tHttpRequest Component basics

Have the same issue. Has anyone solved it or have any work around?

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend