public FakeHttpRequest AddHeader(IDictionary <string, IEnumerable <string> >?headers)
        {
            if (headers?.Count > 0)
            {
                foreach (var(key, values) in headers)
                {
                    Headers.AppendList(key, values.ToList());
                }
            }

            return(this);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Appends the header name and it's values.
 /// </summary>
 /// <param name="name">The header name.</param>
 /// <param name="values">The header values.</param>
 public void AppendList <T>(string name, IList <T> values)
 {
     Headers.AppendList <T>(name, values);
 }
Ejemplo n.º 3
0
        public FakeHttpResponse AddHeader(string key, params string[] values)
        {
            Headers.AppendList(key, values);

            return(this);
        }