Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] cURL command in tsystem

Highlighted
One Star

[resolved] cURL command in tsystem

Hi guys,
I am trying to query a URL using curl command in tsystem :

"cmd curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"
]
when i run this command it just displays this on console and the job never stops:
connecting to socket on port 3405
connected
Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.
Please suggest a better way to use curl command in tsystem.
Thanks in adv!
Baddy

Accepted Solutions
Highlighted
One Star

Re: [resolved] cURL command in tsystem

Hi

new String[]{"cmd","/c","D:\\curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
or
new String[]{"cmd","/c","D:\\curl","http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
Regards,
Pedro

View solution in original post


All Replies
Highlighted
One Star

Re: [resolved] cURL command in tsystem

P.S this runs fine in command prompt!
Please pour in ur suggestions asap.
Thanks!
Highlighted
One Star

Re: [resolved] cURL command in tsystem

Hi
Try this command.
"cmd /c curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"
Or
new String[]{"cmd","/c","curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
Regards,
Pedro
Highlighted
One Star

Re: [resolved] cURL command in tsystem

thanks for your reply Pedro,
when i run your first suggestion , it gives the following error :
'curl' is not recognized as an internal or external command,
operable program or batch file.

And when I run the second , it gives the following error:
'http:' is not recognized as an internal or external command,
operable program or batch file

Sorry, I have less knowledge of Java.
thanks and waiting for your response,
Baddy!
Highlighted
One Star

Re: [resolved] cURL command in tsystem

Hi
new String[]{"cmd","/c","curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
or
new String[]{"cmd","/c","curl","http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
One of them must be working fine.
If not, you'd better use the absolute path of 'curl'.
Regards,
Pedro
One Star

Re: [resolved] cURL command in tsystem

both of these commands give the error:
'curl' is not recognized as an internal or external command,
operable program or batch file.
Can you please suggest how to use the absolute path .
Like , in command prompt my command is like this and it works perfect :
D:\>curl http://test.sd.com/testxxxxx.jsp?param1=BadrishSingh

(since curl.exe is in D:/>)

Please tell how to do the same in tsystem. Is there any way I can set the path of curl.exe in tsystem?
Highlighted
One Star

Re: [resolved] cURL command in tsystem

Hi

new String[]{"cmd","/c","D:\\curl http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
or
new String[]{"cmd","/c","D:\\curl","http://test.sd.com/testxxxxx.jsp?param1=Badrish Singh"}
Regards,
Pedro

View solution in original post

Highlighted
One Star

Re: [resolved] cURL command in tsystem

Thanks Pedro,
I like you ! Smiley Very Happy

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog