Quote:
Originally Posted by Shades of Chaos
Hey all,
I have an NSUrl that leads to a HTML file on the internet and I need this to be changeable. I have got the url changing but if the user enters an invalid url I want to know about it. Is there a way to check is the url is valid?
Thanks
|
You could use the NSData method dataWithContentsOfURL

ptions:error:
That's synchronous, however.
Looking at the docs, NSURLConnection has a method canHandleRequest that lets you preflight a connection before you try to start it. I haven't used it however.