Python请求找不到连接适配器

灰橡树

我在使用python请求调用一些内部API时遇到以下错误。

import requests
data = requests.get('127.0.0.1:8000/')

requests.exceptions.InvalidSchema:找不到“ 127.0.0.1:8000/”的连接适配器

灰色

有一个基本错误。

您需要将http添加到URL。

尝试这个

import requests
data = requests.get('http://127.0.0.1:8000/')

希望能帮助到你

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章