首页 > 其他 > 详细

Working with Data Sources 2

时间:2016-11-15 10:33:00      阅读:152      评论:0      收藏:0      [点我收藏+]

1. While we would like to get some data from the server with authorization, we should apply token from the website frist. Then we pass token in the request command by using headers.

  headers = {"Authorization": "token 1f36137fbbe1602f779300dad26e4c1b7fbab631"}  

  response = requests.get("https://api.github.com/users/VikParuchuri", headers=headers)

2. 

Working with Data Sources 2

原文:http://www.cnblogs.com/kingoscar/p/6064341.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!