With useKeychainPersistance set, if I add authentication credentials
on the request before starting it, they don't get saved in the
keychain, but they do get used if they are already there.
If instead I use the delegate to supply credentials, they get saved
and used correctly.
Is this a bug or intentional? In the latter case, I think it should be
documented, as it made me pull my hair on and off for about two days.
Thanks,
Michele
--
Michele Campeotto
http://flickr.com/micampe
Nice to hear from you again!
I don't think it's intentional, but yes, it does appear as though they won't be saved unless the request has already received an authentication challenge (this may never happen when using basic authentication and shouldPresentCredentialsBeforeChallenge == YES). Actually, I think it would be better to move the saving into readResponseHeaders, since that's where we find out if the credentials are good or not.
I've added a bug for this in github (http://github.com/pokeb/asi-http-request/issues/issue/24), I'll try to change this soon.
Best
Ben