Q:

Can Applescript send get or post requests?

I use Hazel to organize downloaded files on my Mac. I see i can make it run applescripts every time it triggers a rule.
I was wondering if it is possible to make it send something like:
http://my.server.com?type=Show&name=Big+Bang+Theory
Then i could create a small page that logs all downloads.

A:

Sure, the command line utility curl is one way. Applescripts can use command line utilities with the "do shell script" command. So try this...
set theURL to "http://my.server.com?type=Show&name=Big+Bang+Theory"
do shell script "curl " & quoted form of theURL

The above will return the page results to applescript. Maybe you'd rather just open the link in your default browser...
set theURL to "http://my.server.com?type=Show&name=Big+Bang+Theory"
open location theURL

So take your pick!

