• 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
stringWithContentsOfURL with resulting error 256
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stringWithContentsOfURL with resulting error 256


  • Subject: stringWithContentsOfURL with resulting error 256
  • From: James Lin <email@hidden>
  • Date: Thu, 22 Oct 2009 22:16:36 +0800

Hi,

I am trying to access a PHP script (which adds an entry to MySQL database) on my server with the following call:

NSString *result = [NSString stringWithContentsOfURL:theURL encoding:NSUTF8StringEncoding error:&error];

However, the result comes back with an NSError as the following:

Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x15d7b0 "Operation could not be completed. (Cocoa error 256.)
which is a NSFileReadUnknownError = 256.


BUT! The same URL string works perfectly in a Safari window and the PHP script executes fine when accessed from Safari...

Can anyone please point me to how to troubleshoot this one?

Thank you in advance...

James
_______________________________________________

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: stringWithContentsOfURL with resulting error 256
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]
  • Next by Date: Re: NSTextField not getting mouseDown
  • Previous by thread: Re: NSScroller graphical lag/glitches
  • Next by thread: Re: stringWithContentsOfURL with resulting error 256
  • Index(es):
    • Date
    • Thread