curl:
curl -u username:password www.your_url.com
代码调用方式:
将“username:password”经过base64编码后,前面加上Basic与空格,赋值给headers.Authorization,如图: