My problem, as you can see in the title, I get an exception when adding a title. What I'm trying to do is send an authorization request to the TwitchAPI public . Here is the query I'm trying to translate:
curl -H 'Accept: application/vnd.twitchtv.v3+json'
-H 'Authorization: OAuth <access_token>' \
-X GET https://api.twitch.tv/kraken/channel
This is when I add the Accept header, where this exception appears on my face (header). I'm not sure if I translated this correctly, but this is the code that I have right now:
Dim wr = CType(WebRequest.Create("https://api.twitch.tv/kraken/channel"), HttpWebRequest)
wr.Method = "GET"
wr.Headers.Add("Authorization: OAuth <oauth_token>")
wr.Headers.Add("Accept: application/vnd.twitchtv.v3+json")
Return CType(wr.GetResponse(), HttpWebResponse)
where is oauth_token my access token, anyone who could solve this for me? My ass actually worked, trying to figure out such a simple thing, thanks!