Exemplo n.º 1
0
 private async Task SelectWindow(string window)
 {
     // object initializer syntax
     string response = await _restclient.Post <string, SelectWindowParams>(
         "/api/WinAutomation/SelectWindow", new SelectWindowParams()
     {
         window = window
     }
         );
 }
Exemplo n.º 2
0
        static async Task <string> DoRun()
        {
            Console.WriteLine($"connecting to server: {server}");
            WebApp.RestClient restclient = new WebApp.RestClient(server);

            Console.WriteLine($"registering this client to server: {server}");
            // object initializer syntax
            string response = await restclient.Post <string, RequestViewModel> (
                "api/registerclient/Register", new RequestViewModel()
            {
                url = listen
            }
                );

            return(response);
        }