Re: Test for valid URL?
Re: Test for valid URL?
- Subject: Re: Test for valid URL?
- From: Doug McNutt <email@hidden>
- Date: Thu, 16 Sep 2010 12:04:37 -0600
At 12:46 -0500 9/16/10, Michael Grant wrote:
>Neither
>open location "some random string"
>nor
>do shell script "curl some random string"
>
>actually returns an error on my system (the first one returns nothing,
>the second returns an empty string), and they both just fail silently
>
>
curl returns its error messages to STDERR and returns a status to the shell with 0 (zero) being OK.
I'm sure there is a way to persuade do shell script to show that stuff. Something like:
set ercode = do shell script "curl some random string 2>1"
But it's likely that curl would get a 401 error code from a site and be perfectly happy with it. Would that be a "valid" URL? Curl also returns the content of a valid URL in STDOUT unless you redirect it to using -c /dev/null.
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden