获取您自己的 Python 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
import requests url = 'https://w3schools.com/python/demopage.php' #Sometimes the server redirects a request, could be if the file does not exist etc., set the 'allow_redirects' parameter to False to deny redirects: x = requests.delete(url, allow_redirects=False) #print the response text (the content of the requested file): print(x.text)
文件已移动 - W3Schools 中文教程
<body><h1>对象已移动</h1>此文档可在
此处
找到。</body>