Ejemplo n.º 1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            testobject o = new testobject();

            o.name = "超能物战队";
            o.age  = 12;

            var xx = NormalHttpClient.Post <testobject, string>("http://localhost:27215/api/Values?ak=1", o);
        }
Ejemplo n.º 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            testobject o = new testobject();

            o.name = "超能物战队";
            o.age  = 12;
            //建议封装
            var ss = Execute(o);
        }
Ejemplo n.º 3
0
 private static ResponseInfo <string> Execute(testobject o)
 {
     //直接调用
     return(SecurityHttpClient.Post <testobject, string>("http://localhost:27215/api/Values?ak=1", o));
 }