System.Net.Http.AutoRedirectTests.Should_set_cookie_on_redirect C# (CSharp) Méthode

Should_set_cookie_on_redirect() private méthode

private Should_set_cookie_on_redirect ( string path ) : System.Threading.Tasks.Task
path string
Résultat System.Threading.Tasks.Task
        public async Task Should_set_cookie_on_redirect(string path)
        {
            _handler.UseCookies = true;
            using (var client = new HttpClient(_handler)
            {
                BaseAddress = new Uri("http://localhost")
            })
            {
                var response = await client.GetAsync(path);
                response.RequestMessage.Headers.GetValues("Cookie").Single().ShouldBe("foo=bar");
            }
        }
    }