Skip to content

Commit

Permalink
Added (commented out) test code for Basic auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Dec 20, 2010
1 parent 6c8245d commit 25bb422
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/CCouchDBSession.m
Expand Up @@ -14,6 +14,8 @@
#import "CJSONDeserializer.h"
#import "CJSONSerializedData.h"

#import "NSData_Base64Extensions.h"

@implementation CCouchDBSession

@synthesize operationQueue;
Expand Down Expand Up @@ -92,6 +94,12 @@ - (NSMutableURLRequest *)requestWithURL:(NSURL *)inURL
{
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:inURL];

// NSString *theValue = @"username:password";
// NSData *theData = [theValue dataUsingEncoding:NSUTF8StringEncoding];
// theValue = [theData asBase64EncodedString:0];
// theValue = [NSString stringWithFormat:@"Basic %@", theValue];
// [theRequest setValue:theValue forHTTPHeaderField:@"Authorization"];

return(theRequest);
}

Expand Down

0 comments on commit 25bb422

Please sign in to comment.