/// <summary>Gets or sets a known request header.</summary> /// <param name="header">Header to get or set.</param> /// <returns>The header value.</returns> /// <remarks>Request headers are always allowed, the checks should be removed.</remarks> public override string this[Microsoft.OData.Service.Http.HttpRequestHeader header] { get { return(this[HttpHeaderToName.GetRequestHeaderName(header)]); } set { // Need to call us again to perform the checks for disallowed headers this[HttpHeaderToName.GetRequestHeaderName(header)] = value; } }
/// <summary>Given the specified <paramref name="header"/>, returns the name.</summary> /// <param name="header">Enumeration value to get name for.</param> /// <returns>The name for the specified header value.</returns> public static string GetRequestHeaderName(Microsoft.OData.Service.Http.HttpRequestHeader header) { return(HeaderStrings[(int)header]); }
/// <summary>Gets or sets a known request header.</summary> /// <param name="header">Header to get or set.</param> /// <returns>The header value.</returns> /// <remarks>Request headers are always allowed, the checks should be removed.</remarks> public abstract string this[Microsoft.OData.Service.Http.HttpRequestHeader header] { get; set; }