I am going to assume the answer is no but.... Is there a way to use WebClient to send the HEAD method and return the headers as a string or something similar?
相关问题
- Angular RxJS mergeMap types
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- .net中MessageBox.Show使用问题
- IdentityServer 报错:"idp claim is missing"
- 在 IdentityServer 中如何给 id token 添加更多信息
- IdentityServer 的 Selector 在哪个 nuget 包
- 使用 IdentityServer 的项目遭遇错误:"IDX20803: Unable to obt
- ASP.NET Core ConfigureServices 中从 appsettings.json
- .netCore 控制台程序输出配置问题
Most web servers that I request from will accept this method. Not every web server does though. IIS6, for example, will honor the request method SOMETIMES.
This is the status code that is returned when a method isn't allowed...
Thanks, Mike
You are right WebClient does not support this. You can use HttpWebRequest and set the method to HEAD if you want this functionality:
Another way is to inherit from WebClient and override GetWebRequest(Uri address).