Can I send http request to IP address and get response in shell script. For example:1.1.1.1/api/1.do?1=1

Viewed 20

Can I send http request to IP address and get response in shell script. For example:1.1.1.1/api/1.do?1=1 When I try to use curl 1.1.1.1/api/1.do?1=1 or curl http://1.1.1.1/api/1.do?1=1 it show nothing. This is in shell script of website. when I curl other site it work well. However, I use curl in windows commandline it work well.

1 Answers

curl.bat:

CMD /k curl %1

From command line in CMD.

C:>\apps>curl http://127.0.0.1/apps/curltest.php?1=1

That works. Does a Windows batch file work for you?

Related