Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RESTful API's - Easy way to interact?



On May 31, 2008, at 1:12 PM, Jens Alfke wrote:
I think there's a need for some additional API on NSURLConnection to provide finer-grained control over authentication. In particular,
(1) Ability to set credentials on the request before starting the connection
(2) Ability to disable the connection from looking in the Keychain


Thanks Jens, macnetworkprog isn't a list I read, but I'll dip my toe in over there for a good cause. I agree that the above functionality would make all the difference in the world.

On May 30, 2008, at 10:16 PM, Jeremy wrote:
'Basic ' + Base64.encode(username + ':' + password)


Jeremy, if you do have a special case and need to set the authentication header instead of going with the built in functions, cocoa doesn't have any base 64 functionality built in that I know of, but there are many examples floating around the net of adding encodeBase64 methods in a category to either NSString or NSData. Most use libcrypto (a Rubik's Cube of a C library!). Dave Dribin's blog has one such example:

http://www.dribin.org/dave/blog/archives/2006/03/12/base64_cocoa/

-Pete
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >RESTful API's - Easy way to interact? (From: Jeremy <email@hidden>)
 >Re: RESTful API's - Easy way to interact? (From: Jens Alfke <email@hidden>)
 >Re: RESTful API's - Easy way to interact? (From: Jeremy <email@hidden>)
 >Re: RESTful API's - Easy way to interact? (From: Peter Burtis <email@hidden>)
 >Re: RESTful API's - Easy way to interact? (From: Jens Alfke <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.