从 Windows Powershell 发送 HTTP 请求的最佳方式是什么?
最佳答案
找到一种方法:
$page = (New-Object System.Net.WebClient).DownloadString("http://localhost/")
感谢 Steven Murawski 的评论:
The best way really depends on what task you are trying to accomplish as the two answers below have noted. WebClient is the simplest, but HttpWebRequest is the most flexible.
关于http - 从 Windows Powershell 发送 HTTP 请求的最佳方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/340553/