Post() публичный Метод

Execute POST request.
public Post ( string url, NameValueCollection data ) : string
url string
data System.Collections.Specialized.NameValueCollection
Результат string
        public void TestPost()
        {
            HttpClient client = new HttpClient
            {
                UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0"
            };
            var size = "medium";
            var topping = "cheese";
            var customerName = "TestName";
            var phone = "TestPhone";
            var email = "*****@*****.**";
            var delivery = "now";
            var comments = "fast";

            string page = client.Post("https://httpbin.org/post", new NameValueCollection
            {
                {"custname", customerName},
                {"custtel", phone},
                {"custemail", email},
                {"size", size},
                {"topping", topping},
                {"delivery", delivery},
                {"comments", comments}
            });

            Form root = JsonConvert.DeserializeObject<RootObject>(page).form;

            Assert.AreEqual(root.custname, customerName);
            Assert.AreEqual(root.custtel, phone);
            Assert.AreEqual(root.custemail, email);
            Assert.AreEqual(root.size, size);
            Assert.AreEqual(root.topping, topping);
            Assert.AreEqual(root.delivery, delivery);
            Assert.AreEqual(root.comments, comments);

        }