How can I read the HTTP response headers from a web service response in C#?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
After digging through MSDN, all I needed to do was to override the
GetWebResponse
method, and then I could access the response headers:Can't you just refer to
HttpContext.Current.Response.Headers
in your webservice?I'm not sure if that'll work.
If you're getting back an
HttpResponse
, you can just query theHttpResponse.Headers
property.