Skip to content

Instantly share code, notes, and snippets.

@uasi
Created March 2, 2009 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uasi/72824 to your computer and use it in GitHub Desktop.
Save uasi/72824 to your computer and use it in GitHub Desktop.
#import <Cocoa/Cocoa.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSURLProtectionSpace *space = [[NSURLProtectionSpace alloc]
initWithHost:@"www.tumblr.com"
port:0
protocol:@"http"
realm:nil
authenticationMethod:NSURLAuthenticationMethodDefault];
NSURLCredential *credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:space];
NSLog(@"%@", credential);
[pool drain];
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment