• 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: Determining if a url exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining if a url exists


  • Subject: Re: Determining if a url exists
  • From: Matthew Delves <email@hidden>
  • Date: Thu, 7 Feb 2008 18:17:26 +1100


On 07/02/2008, at 5:49 PM, Nick Zitzmann wrote:


On Feb 6, 2008, at 10:47 PM, Matthew Delves wrote:
An app that I'm writing involves fetching of rss feeds. To get around caching I have been appending ?20080207 (or whatever the current date is) to the URL. Unfortunately some server's don't like this and will return a 404. Is there a way using cocoa to determine if a URL will return a 404?


Not without actually doing it, no. You could empty the cache prior to the fetch, though, by calling -[NSURLCache removeAllCachedResponses].

Have tried this, though it still produces the same results. Plus the code I'm running is inside a thread detached from the main thread and thus that function doesn't achieve the desired result.


Could you please expand on what you mean by "Not without actually doing it"? Do you mean not without retrieving the file?

Is there an easy way of using either NSURLRequest or NSURLResponse to see if there will be a file returned instead of a 404?

Thanks,
Matthew Delves
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Determining if a url exists
      • From: Nick Zitzmann <email@hidden>
References: 
 >Determining if a url exists (From: Matthew Delves <email@hidden>)
 >Re: Determining if a url exists (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Determining if a url exists
  • Next by Date: Enabled Binding and Array Controllers
  • Previous by thread: Re: Determining if a url exists
  • Next by thread: Re: Determining if a url exists
  • Index(es):
    • Date
    • Thread