【发布时间】:2021-06-09 17:54:55
【问题描述】:
我正在尝试请求此 API:https://iso19139echnap.geocat.live/geonetwork/srv/api/0.1/groups/11864 如果我将其作为直接 URL 输入,它可以在浏览器中使用。但它在 Python Request 模块或 Post 人中不起作用。
Python 代码如下所示:
import requests
payload = {
'username': 'corey',
'password': 'testing'
}
r = requests.get('https://iso19139echnap.geocat.live/geonetwork/srv/api/0.1/groups/11864')
print(r)
--------------------------------------------------------
returns
<Response [400]>
【问题讨论】:
标签: json api python-requests postman