Ejemplo n.º 1
0
        public async Task <bool> Create(AddWeatherForecastModel model)
        {
            await _stateProvider.SetAuthorizationHeader(_httpClient);

            var response = await _httpClient.PostAsJsonAsync("WeatherForecast", model);

            return(await response.Content.ReadFromJsonAsync <bool>());
        }
Ejemplo n.º 2
0
        public async Task <bool> Create(AddWeatherForecastModel model)
        {
            await _stateProvider.SetAuthorizationHeader(_httpClient);

            return(await _httpClient.PostJsonAsync <bool>("WeatherForecast", model));
        }