Python 请求POST方法中的位置

Python 请求POST方法中的位置,python,json,Python,Json,我需要从网络中保存位置[位置在添加元素之后] 我尝试使用: headers = {'charset': 'utf-8', 'Authorization': key} response = requests.post(url, json=data, headers=headers) print(response.headers.get('Location')) 但在请求中,我没有-无,我如何获得此元素?您能否尝试使用allow\u redirects=False?这可能会

我需要从网络中保存位置[位置在添加元素之后]

我尝试使用:

    headers = {'charset': 'utf-8', 'Authorization': key}
    response = requests.post(url, json=data, headers=headers)
    print(response.headers.get('Location'))

但在请求中,我没有-无,我如何获得此元素?

您能否尝试使用
allow\u redirects=False
?这可能会有帮助

response = requests.post(url, json=data, headers=headers, allow_redirects=False)
print(response.headers)

尝试
打印(response.headers)
你会看到你有什么标题,不,我没有这个,我有所有信息,但我没有位置