import requests def post_data(url, data, count): for i in range(count): response = requests.post(url, data=data) print(f"POST request {i + 1} returned status code: {response.status_code}") # 使用示例 url = "https://www.example.com/api/post" data = {"key": "value"} post_data(url, data, 3)
count参数为循环的次数
标签:count,status,code,python,url,循环,post,data From: https://www.cnblogs.com/dashenblog/p/17084559.html