Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

cURL in Terminal

I am having issues with cURL. I am using it in Applescript, but my script line doesn't even work in the terminal. It was working as of last week until it broke on Friday.


This is what I am using, it returns an empty string, no errors.


curl http://mesonet.agron.iastate.edu/wx/afos/retreive.php?pil=RVAARX


That is the actual site I am trying to reach. If I copy and paste the URL into Safari it loads in the expected data.

Posted on Nov 9, 2015 12:56 PM

Reply
Question marked as Best reply

Posted on Nov 9, 2015 1:33 PM

The site is redirecting you, and you must provide the -L argument to force cURL to follow the redirection for command-line usage. The following works, and was tested on El Capitan 10.11.1 from the Terminal.


curl -L -o rvaarx_hydro.txt "http://mesonet.agron.iastate.edu/wx/afos/retreive.php?pil=RVAARX"

2 replies

cURL in Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.