Exemple #1
0
        public void ShouldAddSingle()
        {
            var headers = new FluentHttpHeaders();

            headers.Add(HeaderTypes.Authorization, "the-xx");
            Assert.Equal("the-xx", headers.Authorization);
        }
Exemple #2
0
        public void ShouldAddEnumerable()
        {
            var headers = new FluentHttpHeaders();

            headers.Add(HeaderTypes.Accept, new[] { "json", "msgpack" });
            Assert.Equal("json,msgpack", headers.Accept);
        }
Exemple #3
0
        public void ShouldAddWithStringValues()
        {
            var headers = new FluentHttpHeaders();

            StringValues str = new[] { "the-xx", "supersecret" };

            headers.Add(HeaderTypes.Authorization, str);
            Assert.Equal("the-xx,supersecret", headers.Authorization);
        }