使用英语阅读

通过


WebTestResponse.Headers 属性

获取与服务器响应相关联的标头。

命名空间:  Microsoft.VisualStudio.TestTools.WebTesting
程序集:  Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

语法

public WebHeaderCollection Headers { get; internal set; }

属性值

类型:System.Net.WebHeaderCollection
一个 WebHeaderCollection 集合。

异常

异常 条件
ObjectDisposedException

已释放当前的实例。

备注

Headers 属性是一个名称/值对集合,包含与响应一起返回的 HTTP 标头值。 从 Internet 资源返回的公共标头信息公开为 WebTestResponse 类的属性。 下表列出了 API 公开为属性的公共标头。

Header

属性

内容编码

ContentEncoding

Content-Length

ContentLength

Content-Type

ContentType

上次修改时间

LastModified

服务器

Server

.NET Framework 安全性

请参见

参考

WebTestResponse 类

Microsoft.VisualStudio.TestTools.WebTesting 命名空间

其他资源

HTTP