The tHttpRequest component is part of the Internet family of components, and makes both POST and GETrequests to the specified URI.
Schema
tHttpRequest has a fixed Schema consisting of a single String field named RequestBody. For successful requests,RequestBody will contain the result of the request.
URI
URI allows you to specify the address of the resource required.
Method
tHttpRequest allows you to make both POST and GET requests. For POST request, you must specify a file that contains the Post parameters.
Write response content to file
As well as writing the request response as row data, tHttpRequest may also write the response to a file. Selecting this option allows you to specify the name of a file that the response should be written to.
Headers
Headers allows you to specify HTTP Header Fields, as value-pairs. This allows you to add or override the headers that are sent with the request.
Need authentication
If the service that is being requested, requires user and password authentication, select this option. This allows you to specify the user and password that will be used for the request.
Example #1
In this example, a GET request is used, to get a stock quotation from Yahoo! Finance.
As can be seen from the screenshot, below, a correctly formatted URI"http://finance.yahoo.com/d/quotes.csv?s=GOOG&f=snab" has been entered as a GET request.
Example #1 Result
Starting job tHttpRequestExample at 07:41 17/10/2013. [statistics] connecting to socket on port 4073 [statistics] connected .------------------------------------. | tLogRow_1 | |=----------------------------------=| |ResponseContent | |=----------------------------------=| |"GOOG","Google Inc.",897.95,894.22 | '------------------------------------' [statistics] disconnected Job tHttpRequestExample ended at 07:41 17/10/2013. [exit code=0]