我需要对Web服务运行不同的连续调用,而不需要读取特定的响应,只需要执行。
最简单的方法是什么?我可以运行asp.net或php脚本。
https://ws1/ws/ws.aspx?propid=10468&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=1022&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=4564&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=104688&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=11234&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=5432&action=1&pwd=dsdgsdfgs
https://ws1/ws/ws.aspx?propid=23445&action=1&pwd=dsdgsdfgs
答案 0 :(得分:1)
如果使用.NET,请使用WebClient类来请求URL,并忽略响应。
Imports System.Net
Dim urls() As String = { "url1", "url2" }
Dim webClient As New WebClient()
For Each url in urls
webClient.DownloadData(url)
Next
答案 1 :(得分:1)
在PHP中,您将使用curl类向URL发出请求,并接收响应。