public static WordOfTheDayModel Convert(this WordOfTheDay @this) { var wordOfTheDayModel = new WordOfTheDayModel { PhraseModel = @this.Phrase.Convert(), ActiveIn = @this.ActiveIn }; return(wordOfTheDayModel); }
private async void button1_Click(object sender, EventArgs e) { JsonHttp.Options options = new JsonHttp.Options() { AllowAutoRedirect = true, DefaultRequestHeaders = new Dictionary <string, string>(), AddMediaTypeWithQualityHeadersJson = true, UseLocationHeaderForRedirects = true }; WordOfTheDay wotd = await JsonHttp.Get <WordOfTheDay>(new Uri("http://urban-word-of-the-day.herokuapp.com/today"), options); wotd = wotd; }