예제 #1
0
        static async Task Main(string[] args)
        {
            var baseUrl = @"http://localhost:5000";

            var client  = new WeatherForecastClient(baseUrl, new HttpClient());
            var listado = await client.GetAsync();

            Debug.WriteLine(listado);
            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("This is just a sample Console Client for OpenAPI.");
            WeatherForecastClient client = new WeatherForecastClient("https://localhost:44390", new System.Net.Http.HttpClient( ));

            Console.WriteLine($"The client will get forcasts form {client.BaseUrl} server.");
            var request = client.GetAsync( );

            request.Wait( );
            foreach (var forcast in request.Result)
            {
                Console.WriteLine(forcast.Summary);
            }
        }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("This is just a sample Unity Client for OpenAPI.");
        WeatherForecastClient client = new WeatherForecastClient("https://localhost:44390", new System.Net.Http.HttpClient( ));

        Debug.Log($"The client will get forcasts form {client.BaseUrl} server.");
        var request = client.GetAsync( );

        request.Wait( );
        foreach (var forcast in request.Result)
        {
            Debug.Log(forcast.Summary);
        }
    }