编程语言
首页 > 编程语言> > Base64 Authentication Python

Base64 Authentication Python

作者:互联网

 

python3

import base64
userpass = username + ':' + password
encoded_u = base64.b64encode(userpass.encode()).decode()
headers = {"Authorization" : "Basic %s" % encoded_u}

 

参考

Base64 Authentication Python

标签:Base64,Python,base64,Authentication,encoded,userpass
来源: https://www.cnblogs.com/kaituorensheng/p/16683400.html