HTTP basic authentication with iOS SDK

Today , I was busy for HTTP basic authentication. I have a web development background experience and I understand about HTTP basic authentication. So, I used base64 library from http://cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html and it's not working. I took 1 hour and server can't get username and password. No, I retrieve all header

but there is no Authorization. So, I know , something wrong in base64 encoding. I search the new code fro base 64 encoding and I found this. NSData+Additions is working fine with Authorization in header request.

If you want to request with basic authentication , you can add username and password like following

comments powered byDisqus