小编Oll*_*lie的帖子

使用 POST 请求标头发送 x-api-key Python

我遇到了一个问题,其中指出:

#Write a script that uses a web API to create a social media post.
#There is a tweet bot API listening at http://127.0.0.1:8082, GET / returns basic info about the API.
#POST / with x-api-key:tweetbotkeyv1 and data with user tweetbotuser and a status-update of alientest.
Run Code Online (Sandbox Code Playgroud)

我的代码响应我没有提供 x-api-key,但它在标头中。我的代码:

#Write a script that uses a web API to create a social media post.
#There is a tweet bot API listening at http://127.0.0.1:8082, GET / returns basic info about the API.
#POST …
Run Code Online (Sandbox Code Playgroud)

python post request-headers python-3.x python-3.8

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

post ×1

python ×1

python-3.8 ×1

python-3.x ×1

request-headers ×1