OtherExtensions.GetFirstValueOrNull(HttpHeaders, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the first value associated with the supplied header name.
public static string GetFirstValueOrNull (this System.Net.Http.Headers.HttpHeaders headers, string name);
static member GetFirstValueOrNull : System.Net.Http.Headers.HttpHeaders * string -> string
<Extension()>
Public Function GetFirstValueOrNull (headers As HttpHeaders, name As String) As String
Parameters
- headers
- HttpHeaders
The collection of HTTP headers and their values.
- name
- String
The header name whose value to get.
Returns
The first value corresponding to the supplied header name, if the name is found in the collection; otherwise, an empty string.