Two questions for Shizzow developers

10 views
Skip to first unread message

Mindwarm

unread,
Jun 26, 2009, 3:51:51 PM6/26/09
to Shizzow-Dev
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

Ryan Snyder

unread,
Jun 26, 2009, 5:28:49 PM6/26/09
to Shizzow-Dev
Hi John,

We're using a wildcard certificate, which we've recently found works
fine with single level domain prefixes (api.shizzow.com) but does not
always support multi-level domain prefixes (v0.api.shizzow.com).
We'll take a look at a fix for this. I don't know if anyone has found
a workaround for this issue yet... maybe Bill has?

In order to listen to a Shizzow user, you can call
https://v0.api.shizzow.com/people/ryansnyder/listen using PUT as the
curl request method.

Cheers,
Ryan


On Jun 26, 12:51 pm, Mindwarm <mindw...@gmail.com> wrote:
> 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:PASSW...@v0.api.shizzow.com/people/USERNAME/shouts
>
> which gives me the error:
>
> Error - untrusted server certificate https://USERNAME:PASSW...@v0.api.shizzow.com/people/USERNAME/shouts
Reply all
Reply to author
Forward
0 new messages