阅读背景:

如何在PowerShell中获取数字HTTP状态代码

来源:互联网 

I know of a few good ways to build web clients in PowerShell: the .NET classes System.Net.WebClient and System.Net.HttpWebRequest, or the COM object Msxml2.XMLHTTP. From what I can tell, the only one which gives you access to the numeric status code (e.g. 200, 404), is the last, the COM object. The problem I have is that I don't like the way it works and I don't like relying on the COM object being there. I also know that from time to time Microsoft will decide to kill COM objects (ActiveX kill bits) due to security vulnerabilities and so on. to build web clients




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: