private void BtnGetToken_Click(object sender, EventArgs e) { twitterController.GetToken(tbPin.Text); }
public static async Task <HttpServiceResult <Type> > GetTwitterDataFromServiceWithToken <Type>(string queryString) { HttpServiceResult <Type> hts = new HttpServiceResult <Type>(); HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", TwitterController.GetToken()); HttpResponseMessage response = await client.GetAsync(queryString); SetHttpServiceResult(hts, response); return(hts); }