Hi,
My first post to this group. :) I've got two questions.
(1) I'm using the REST API to grab my shouts on an iPhone. I've
noticed that unless I use a private API (which Apple's appstore
forbids), I get an error. I'm trying the following:
https://USERNAME:PASS...@v0.api.shizzow.com/people/USERNAME/shouts
which gives me the error:
Error - untrusted server certificate
https://USERNAME:PASS...@v0.api.shizzow.com/people/USERNAME/shouts
My workaround is implement some of the NSURLRequest interface to allow
any request as follows:
@interface NSURLRequest (SomePrivateAPIs)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host;
+ (void)setAllowsAnyHTTPSCertificate:(BOOL)allows forHost:(NSString *)
host;
@end
@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
This works, but is a no-no for the iPhone.
Is there a better way around this "untrusted server certificate"
error? One Apple will approve of for an app in their store?
(2) What is the RESTful way to listen to a new person? I saw that in
the API docs, but can you give me a URL or curl example?
Thanks!
John Roberts
@mindwarm
http://www.mindwarm.com