public async Task <bool> Create(AddWeatherForecastModel model) { await _stateProvider.SetAuthorizationHeader(_httpClient); var response = await _httpClient.PostAsJsonAsync("WeatherForecast", model); return(await response.Content.ReadFromJsonAsync <bool>()); }
public async Task <bool> Create(AddWeatherForecastModel model) { await _stateProvider.SetAuthorizationHeader(_httpClient); return(await _httpClient.PostJsonAsync <bool>("WeatherForecast", model)); }