daily pastebin goal
44%
SHARE
TWEET

ConsumeAnApi

CryptoJones Nov 24th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             Dim client As HttpClient = New HttpClient()
  2.             client.BaseAddress = new Uri("https://api.cheapweather.com/")
  3.             client.DefaultRequestHeaders.Accept.Clear()
  4.             client.DefaultRequestHeaders.Add("token", accessToken)
  5.             client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
  6.             Dim response As HttpResponseMessage = client.GetAsync("v1/zip/" + ZipOption.Text).Result
  7.             If response.IsSuccessStatusCode Then
  8.                 Dim data = response.Content.ReadAsStringAsync().Result
  9.             End If
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