/// <summary> /// Removes the specified request <paramref name="header"/> from the collection. /// </summary> /// <param name="header"> /// One of theHttpRequestHeader enum values, represents /// the request header to remove. /// </param> /// <exception cref="ArgumentException"> /// <paramref name="header"/> is a restricted header. /// </exception> /// <exception cref="InvalidOperationException"> /// The current <see cref="WebHeaderCollection"/> instance doesn't allow /// the request <paramref name="header"/>. /// </exception> public void Remove(System.Net.HttpRequestHeader header) { DoWithCheckingState(RemoveWithoutCheckingName, Convert(header), null, false, false); }
public void Set(System.Net.HttpRequestHeader header, string?value) { }
/// <summary> /// Adds the specified request <paramref name="header"/> with /// the specified <paramref name="value"/> to the collection. /// </summary> /// <param name="header"> /// One of theHttpRequestHeader enum values, represents /// the request header to add. /// </param> /// <param name="value"> /// A <see cref="string"/> that represents the value of the header to add. /// </param> /// <exception cref="ArgumentException"> /// <para> /// <paramref name="header"/> is a restricted header. /// </para> /// <para> /// -or- /// </para> /// <para> /// <paramref name="value"/> contains invalid characters. /// </para> /// </exception> /// <exception cref="ArgumentOutOfRangeException"> /// The length of <paramref name="value"/> is greater than 65,535 characters. /// </exception> /// <exception cref="InvalidOperationException"> /// The current <see cref="WebHeaderCollection"/> instance doesn't allow /// the request <paramref name="header"/>. /// </exception> public void Add(System.Net.HttpRequestHeader header, string value) { DoWithCheckingState(AddWithoutCheckingName, Convert(header), value, false, true); }
public string?this[System.Net.HttpRequestHeader header] { get { throw null; } set { } }
public void Remove(System.Net.HttpRequestHeader header) { }
internal static string Convert(System.Net.HttpRequestHeader header) { return(convert(header.ToString())); }
/// <summary> /// Gets or sets the specified request <paramref name="header"/> in the collection. /// </summary> /// <value> /// A <see cref="string"/> that represents the value of the request <paramref name="header"/>. /// </value> /// <param name="header"> /// One of the HttpRequestHeader enum values, represents /// the request header to get or set. /// </param> /// <exception cref="ArgumentException"> /// <para> /// <paramref name="header"/> is a restricted header. /// </para> /// <para> /// -or- /// </para> /// <para> /// <paramref name="value"/> contains invalid characters. /// </para> /// </exception> /// <exception cref="ArgumentOutOfRangeException"> /// The length of <paramref name="value"/> is greater than 65,535 characters. /// </exception> /// <exception cref="InvalidOperationException"> /// The current <see cref="WebHeaderCollection"/> instance doesn't allow /// the request <paramref name="header"/>. /// </exception> public string this[System.Net.HttpRequestHeader header] { get { return(Get(Convert(header))); } set { Add(header, value); } }
public void Add(System.Net.HttpRequestHeader header, string value) { }
public string this[System.Net.HttpRequestHeader header] { get { return(default(string)); } set { } }
public string this[System.Net.HttpRequestHeader header] { get => throw null; set => throw null;