Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                HttpClientGetTest();
            }
            catch (Exception e)
            {
                throw e;
            }

            return;

            var apiClient = new HttpClient();

            // apiClient.BaseAddress = new System.Uri("http://localhost:6357");
            apiClient.BaseAddress = new System.Uri("http://localhost:63581");

            var command = new ModifyCooperatorBasic
            {
                CooperatorID = "52b007cd9a37601480b6d5e6",
                Name         = "ivan",
                Type         = 0,
                Remark       = ""
            };

            var task = apiClient.DoCommand(command);

            var result = task.Result.Content.ReadAsStringAsync().Result;

            Console.Write(result);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var apiClient = new HttpClient();
            // apiClient.BaseAddress = new System.Uri("http://localhost:6357");
            apiClient.BaseAddress = new System.Uri("http://localhost:18193");

            var command = new ModifyCooperatorBasic
            {
                CooperatorID = "52b007cd9a37601480b6d5e6",
                Name = "ivan",
                Type = 0,
                Remark = ""
            };

            var task = apiClient.DoCommand(command);

            var result = task.Result.Content.ReadAsStringAsync().Result;
            Console.Write(result);
        }