开发者

Base64 HTTP Authenthication

开发者 https://www.devze.com 2023-02-14 14:47 出处:网络
How can I get the contents of a URL using base64 authentication (username:password) with the iPhone SDK

How can I get the contents of a URL using base64 authentication (username:password) with the iPhone SDK

Passing the username and password in the URL doesn't work because the API states that the authentication is basi开发者_JS百科c web authentication, using base64 encryption of "username:password"

I hope somebody can help me out with this one.

Thanks in advance!


Ok I've managed to figure it out. You have to set the correct Authorization value in the header and this will do the trick :D


You do realize that since you are sending the password in base64, you might as well just send it in plain text, right? You should store anything you wouldn't want someone else to see in base64 due to it's very simple nature.

0

精彩评论

暂无评论...
验证码 换一张
取 消