github-api - 在 PyGithub API 中设置 Accept Headers 以获取提交差异
问题描述
我想使用 PyGithub 获得以下查询的结果。有没有办法在 pygithub 中设置接受标头?我想要 diff 格式的输出,我不想使用 github compare API。
那么有没有办法使用pygithub提出以下请求?
curl \
-H "Accept: application/vnd.github.diff" \
http(s)://{hostname}/api/v3/repos/octocat/hello-world/commits/REF
解决方案
推荐阅读
- linux - du -hs 后如何按名称并排排序
- python - 在没有任何 Python 库的情况下,如何在 Python 中进行左和中操作?
- angularjs - angularjs中的逻辑容器
- python - Python - 球坐标有Z轴偏差
- apache - 将 phpmyadmin 安装到 VPS Ubuntu 16.04 时出现问题
- python - python - 登录页面并获取cookies
- python - Python在对列表中的数字进行排序时忽略零
- python - 如何从数据框中删除负时间?
- javascript - 简单的 Javascript:在数组上运行函数
- c# - 为什么我的应用程序随着时间的推移变得反应迟钝?