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; }
private async void button1_Click(object sender, EventArgs e) { JsonHttp.Options options = new JsonHttp.Options() { AllowAutoRedirect = true }; WordOfTheDay wotd = await JsonHttp.Get <WordOfTheDay>(new Uri("http://urban-word-of-the-day.herokuapp.com/today"), options); wotd = wotd; WordOfTheDay toPost = new WordOfTheDay() { word = "test", meaning = "something" }; WordOfTheDay wotdPost = await JsonHttp.Post <WordOfTheDay>(new Uri(""), toPost, options); }