你可以使用 Python 的 requests 库来完成这个任务。以下是一个示例代码:

import requests

url = 'http://localhost:8080/production-test/production/testresult/regInfo'
headers = {
    'cookie': 'JSESSIONID=DBDFC9A42671C92B8EE65308F0F06591',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
data = {
    'ids[]': [4872, 4319]
}

response = requests.delete(url, headers=headers, data=data)
print(response.status_code)
print(response.text)

这个代码发送一个 DELETE 请求到指定的 URL,带上指定的请求头和表单数据。你可以根据实际情况修改 URL、请求头和表单数据。最后,打印出响应的状态码和响应内容。

Python DELETE 请求示例:使用 requests 库发送 DELETE 请求

原文地址: https://www.cveoy.top/t/topic/pzVX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录