• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] cURL command in tsystem

#1 2012-06-13 11:33:58

baddy_sik
Member
Registered: 2011-08-09
Posts: 29

[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"

[[ my curl.exe is in Dhmm>
I cant change the environment variables predefined in windows. Its C:\windows\system32 . ]]

when i run this command it just displays this on console and the job never stops:

[statistics] connecting to socket on port 3405
[statistics] connected
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

Please suggest a better way to use curl command in tsystem.

Thanks in adv!
Baddy

Offline

#2 2012-06-13 11:37:19

baddy_sik
Member
Registered: 2011-08-09
Posts: 29

Re: [resolved] cURL command in tsystem

P.S this runs fine in command prompt!

Please pour in ur suggestions asap.

Thanks!

Offline

#3 2012-06-13 11:37:50

pedro
Member
Registered: 2011-11-17
Posts: 3682

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


Only Paranoid Survive.

Offline

#4 2012-06-13 11:44:59

baddy_sik
Member
Registered: 2011-08-09
Posts: 29

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!

Offline

#5 2012-06-13 11:49:59

pedro
Member
Registered: 2011-11-17
Posts: 3682

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


Only Paranoid Survive.

Offline

#6 2012-06-13 11:57:27

baddy_sik
Member
Registered: 2011-08-09
Posts: 29

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 Dhmm>)


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

Offline

#7 2012-06-13 12:00:18

pedro
Member
Registered: 2011-11-17
Posts: 3682

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


Only Paranoid Survive.

Offline

#8 2012-06-13 12:02:24

baddy_sik
Member
Registered: 2011-08-09
Posts: 29

Re: [resolved] cURL command in tsystem

Thanks Pedro,

I like you ! big_smile

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] cURL command in tsystem

Board footer

Powered by FluxBB