你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
OtherExtensions.GetValuesOrNull(HttpHeaders, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与提供的标头名称关联的值。
public static System.Collections.Generic.IEnumerable<string> GetValuesOrNull(this System.Net.Http.Headers.HttpHeaders headers, string name);
static member GetValuesOrNull : System.Net.Http.Headers.HttpHeaders * string -> seq<string>
<Extension()>
Public Function GetValuesOrNull (headers As HttpHeaders, name As String) As IEnumerable(Of String)
参数
- headers
- HttpHeaders
HTTP 标头及其值的集合。
- name
- String
要获取其值的标头名称。
返回
与提供的标头名称对应的值(如果在集合中找到该名称);否则为 null。