python - 如何使用 POST GET 传递 access_token
问题描述
我有一个密钥(访问令牌),我需要将其传递给服务器进行身份验证。不确定如何在 python3 中正确执行此操作。有人可以帮忙吗?这是我的代码:
mytoken='abcdefg123456'
headers='{ not sure what to put here!}
auth = requests.post(url='https://api.bitoasis.net/v1/access_token', headers=headers)
我需要两件事的帮助......在标题中放入什么,我需要在 url 之后包含 data=mytoken 吗?
解决方案
推荐阅读
- python - 在 pandas 中按组连续获得最长连续周数
- jquery - 未捕获的类型错误:无法读取 null 的属性“按钮”
- zsh - ZSH“找不到命令:z”
- java - 如何让spring cron作业由spring boot的app用户以外的用户执行
- python - 如何从空文件初始化dict文件代码?
- python - 给定 http 链接的源代码中的 Grep 字符串
- python - CUDA_ERROR_OUT_OF_MEMORY 张量流
- json - Python 和 BeautifulSoup:如何将 JSON 转换为 CSV
- spring-boot - 获取 NullPointer 而不是创建令牌
- apache-spark - 从 PySpark 查询日期之间的 Vertica