Class HeaderRetriever
Parameter retriever that retrieves a header by name
Namespace: Seltzr.ParameterRetrievers
Assembly: Seltzr.dll
Syntax
C#
public class HeaderRetriever : ParameterRetriever
Constructors
Initializes a new instance of the HeaderRetriever class.
C#
public HeaderRetriever(string name, string defaultValue = null)
Parameters
nameString
The name of the header to retrieve
defaultValueString
The default value of the header if none is specified
Methods
Gets the value of the header for the given request
C#
public override string GetValue(HttpRequest request)
Parameters
requestHttpRequest
The HTTP request context
Returns
The retrieved header value