• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Test for valid URL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Test for valid URL? (From: Michael Grant <email@hidden>)
 >Re: Test for valid URL? (From: Steve Thompson <email@hidden>)
 >Re: Test for valid URL? (From: Michael Grant <email@hidden>)

  • Prev by Date: Re: Test for valid URL?
  • Next by Date: Re: Test for valid URL?
  • Previous by thread: Re: Test for valid URL?
  • Next by thread: Re: Test for valid URL?
  • Index(es):
    • Date
    • Thread