public void Add(HttpRequestHeader header, string value) { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } this.Add(header.GetName(), value); }
public void Remove(HttpRequestHeader header) { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } this.Remove(header.GetName()); }
public string this[HttpRequestHeader header] { get { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } return(this[header.GetName()]); } set { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } this[header.GetName()] = value; } }
public string this[HttpRequestHeader header] { get { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } return this[header.GetName()]; } set { if (!AllowHttpRequestHeader) { throw new InvalidOperationException(SR.net_headers_req); } this[header.GetName()] = value; } }