HeaderParsingFeature.TryGetHeaderValue 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.
Overloads
TryGetHeaderValue<T>(HeaderKey<T>, T) |
Tries to get a header value if it exists and can be parsed. |
TryGetHeaderValue<T>(HeaderKey<T>, T, ParsingResult) |
Tries to get a header value if it exists and can be parsed. |
TryGetHeaderValue<T>(HeaderKey<T>, T)
- Source:
- HeaderParsingFeature.cs
Tries to get a header value if it exists and can be parsed.
public bool TryGetHeaderValue<T> (Microsoft.AspNetCore.HeaderParsing.HeaderKey<T> header, out T? value);
member this.TryGetHeaderValue : Microsoft.AspNetCore.HeaderParsing.HeaderKey<'T> * 'T -> bool
Public Function TryGetHeaderValue(Of T) (header As HeaderKey(Of T), ByRef value As T) As Boolean
Type Parameters
- T
The type of the header value.
Parameters
- header
- HeaderKey<T>
The header to parse.
- value
- T
A resulting value.
Returns
true
if the header value was successfully fetched parsed.
Applies to
TryGetHeaderValue<T>(HeaderKey<T>, T, ParsingResult)
- Source:
- HeaderParsingFeature.cs
Tries to get a header value if it exists and can be parsed.
public bool TryGetHeaderValue<T> (Microsoft.AspNetCore.HeaderParsing.HeaderKey<T> header, out T? value, out Microsoft.AspNetCore.HeaderParsing.ParsingResult result);
member this.TryGetHeaderValue : Microsoft.AspNetCore.HeaderParsing.HeaderKey<'T> * 'T * ParsingResult -> bool
Public Function TryGetHeaderValue(Of T) (header As HeaderKey(Of T), ByRef value As T, ByRef result As ParsingResult) As Boolean
Type Parameters
- T
The type of the header value.
Parameters
- header
- HeaderKey<T>
The header to parse.
- value
- T
A resulting value.
- result
- ParsingResult
Details on the parsing operation.
Returns
true
if the header value was successfully fetched parsed.