Re: Alternative to stringWithContentsOfURL
Re: Alternative to stringWithContentsOfURL
- Subject: Re: Alternative to stringWithContentsOfURL
- From: Andy Lee <email@hidden>
- Date: Tue, 27 Oct 2009 18:25:45 -0400
On Oct 27, 2009, at 11:11 AM, James Lin wrote:
I am still having the mysterious error of "Internal Error 500"
message returned from stringWithContentsOfURL.
Are you passing the URL you think you are passing? If you put this
line in your code
NSString *result = [NSString stringWithContentsOfURL:@"http://the.actual.url
" encoding:NSUTF8StringEncoding error:&error];
...using a literal string for the URL and not a variable, do you still
get the error?
What if you change the PHP script to do nothing but return "Hello"?
Does that work?
Did you try the other methods Jens listed to try to narrow down the
problem? Namely:
-[NSString stringWithContentsOfURL:usedEncoding:error:]
-[NSData dataWithContentsOfURL:...]
-[NSURLConnection sendSynchronousRequest:...]
Can you show us the URL? My understanding is that browsers are
relatively permissive when it comes to escaping the necessary
characters -- maybe Cocoa methods are less so.
Just some guesses...
--Andy
_______________________________________________
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