Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
(Sorry about my bad english)
I want to send multiple http request by using post method
I'm using tHttpRequest to call api like picture
using post method with parameters read from .txt file. Like above
login_id=7777&system_cd=1&role_cd=1 login_id=9999999999999&system_cd=1&role_cd=1
It's works. But it send two request of first parameters line
login_id=7777&system_cd=1&role_cd=1
second parameters line, could not send
login_id=9999999999999&system_cd=1&role_cd=1
How to send multiple request by using post method?
@vapukov Thank you so much for supporting me
But i want to use post request. I can't set URL like this
"http://localhost/auth2/v1/api/lock"+((String)globalMap.get("row3.parameter"))
For POST request, you must specify a file that contains the Post parameters.
(https://www.talendbyexample.com/talend-thttprequest-component.html)
I have answer in stackoverflow post
This is a solution
You need reed You file with tFileInutDelimited
then use tFlowToIterate for save each row to variable
for example:
-if Your file contain 1 row with full parameter for each iteration
login_id=7777&system_cd=1&role_cd=1 login_id=9999999999999&system_cd=1&role_cd=1
use delimiter | and schema with single column - parameters (String)
and change Your URI to :
"http://localhost/auth2/v1/api/lock"+((String)globalMap.get("row3.parameter"))
row3 - need change to real row number in Your Job
tJavaFlex - empty, just dummy connector (or debug information print)
Your tHTTP request - somewhere right from sample picture, connected by OnSubJobOk from tJavaFlex
@vapukov Thank you so much for supporting me
But i want to use post request. I can't set URL like this
"http://localhost/auth2/v1/api/lock"+((String)globalMap.get("row3.parameter"))
For POST request, you must specify a file that contains the Post parameters.
(https://www.talendbyexample.com/talend-thttprequest-component.html)
I have answer in stackoverflow post
This is a solution
same idea, and why not use tRESTClient? it support POST
thank you so much
It's works perfectly
welcome!