博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Working with Data Sources 2
阅读量:4700 次
发布时间:2019-06-09

本文共 538 字,大约阅读时间需要 1 分钟。

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. Making a GET request to https://api.github.com/user will give you information about the user that the authentication token is for.

转载于:https://www.cnblogs.com/kingoscar/p/6064341.html

你可能感兴趣的文章
CF1179B Tolik and His Uncle
查看>>
CF787D Legacy
查看>>
CF1175F The Number of Subpermutations
查看>>
CF1208F Bits And Pieces
查看>>
CF1208C Magic Grid
查看>>
CF1208D Restore Permutation
查看>>
CF1172B Nauuo and Circle
查看>>
CF1178D Prime Graph
查看>>
CF1190D Tokitsukaze and Strange Rectangle
查看>>
CF1202F You Are Given Some Letters...
查看>>
CF1179C Serge and Dining Room
查看>>
CF1168B Good Triple
查看>>
CF1208E Let Them Slide
查看>>
AT2000 Leftmost Ball
查看>>
CF1086E Beautiful Matrix
查看>>
在单位上班的25条建议(建议收藏)
查看>>
web前端--http协议
查看>>
idea选中文件时左侧菜单自动定位到文件所在位置
查看>>
idea导入eclipse项目并运行
查看>>
类加载器
查看>>