SHARE
TWEET

Untitled

a guest Jun 26th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string url = "";
  2.  
  3. using (HttpClient client = new HttpClient())
  4. {
  5.     client.BaseAddress = new Uri(url);                  
  6.     client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)");
  7.     client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
  8.  
  9.     var content = await client.GetStringAsync(url);
  10.     return JsonConvert.DeserializeObject<Object>(content);
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top