Exemple #1
0
 public void SetHeader(string name, string value)
 {
     _httpHeaders.SetHeader(name, value);
     if (_headerNameValues.ContainsKey(name))
     {
         _headerNameValues[name] = value;
     }
     else
     {
         _headerNameValues.Add(name, value);
     }
 }
Exemple #2
0
 public string this[string name]
 {
     get
     {
         HRESULT hr = _headers.GetHeader(name, out string value);
         Debug.Assert(hr == HRESULT.S_OK);
         return(value);
     }
     set
     {
         HRESULT hr = _headers.SetHeader(name, value);
         Debug.Assert(hr == HRESULT.S_OK);
     }
 }