[resolved] cURL command in tsystem

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

All Replies
One Star

Re: [resolved] cURL command in tsystem

P.S this runs fine in command prompt!
Please pour in ur suggestions asap.
Thanks!
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
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!
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
One Star

Re: [resolved] cURL command in tsystem

Thanks Pedro,
I like you ! Smiley Very Happy

2019 GARNER 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

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

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download