title: Correct way to add "autorization : bearer" header in an HttpWebRequest
body: <p><strong>Context</strong></p>
  <p>I want to code this curl command in VB.NET</p>
  <pre><code>curl -X GET 'https://api.twitch.tv/helix/users?login=crunchprank' \
  -H 'Authorization: Bearer YY' \
  -H 'Client-Id: XX'
  </code></pre>
  <p>This curl works perfectly if executed in online curl like <a href="https://reqbin.com/curl" rel="nofollow noreferrer">https://reqbin.com/curl</a></p>
  <p>Client Id and Bearer are ok.</p>
  <p>Here is my VB.Net code</p>
  <pre><code>Dim strTwitchApiRequestChannelUrl As String
  Dim httpTwitchApiRequestChannel As HttpWebRequest
  Dim httpTwitchApiRequestChannelResponse As HttpWebResponse
  Dim strTwitchApiRequestChannelResponse As String
  
  strTwitchApiRequestChannelUrl = &quot;https://api.twitch.tv/helix/users?&quot; &amp; strTwitchChannelId
  httpTwitchApiRequestChannel = CType(WebRequest.Create(strTwitchApiRequestChannelUrl), HttpWebRequest)
  httpTwitchApiRequestChannel.Timeout = 10000
  httpTwitchApiRequestChannel.Headers(&quot;client_id&quot;) = &quot;XX&quot;
  httpTwitchApiRequestChannel.Headers(&quot;Authorization&quot;) = &quot; Bearer &quot; &amp; YY
   httpTwitchApiRequestChannelResponse = TryCast(httpTwitchApiRequestChannel.GetResponse(), HttpWebResponse)
  If httpTwitchApiRequestChannelResponse.StatusCode = 200 Then
     Using responseStream As Stream = httpTwitchApiRequestChannelResponse.GetResponseStream()
           Dim reader As StreamReader = New StreamReader(responseStream)
           strTwitchApiRequestChannelResponse = reader.ReadToEnd()
     End Using
  End If
  </code></pre>
  <p><strong>Issue</strong>:</p>
  <p>I get an 401 response code. I'm pretty sure it's because of the autorization headers. It missed the <code>:</code></p>
  <p>Same issue if i did this :
  <code>httpTwitchApiRequestChannel.Headers(&quot;Authorization&quot;) = &quot;: Bearer &quot; &amp; YY</code></p>
  <p>And I cannot do this <code>httpTwitchApiRequestChannel.Headers(&quot;Authorization: Bearer &quot;) = YY</code> because i got an error: Specified value has invalid HTTP Header characters. (Parameter 'name')&quot;}</p>