title: Not able to pass Bearer token in headers of a GET request in Golang
body: <p>I am using oauth2 to access a third party API. I can get the access token alright, but when I try to call the API by passing the bearer token in the request headers it gives me 401 (Unauthorized) error.  Although it works well when I try to do it via POSTMAN by passing headers as  (Authorization: Bearer ). But it does not work using go.</p>
  
  <p>Here is the code sample.</p>
  
  <pre><code>url := "http://api.kounta.com/v1/companies/me.json"
  
  var bearer = "Bearer " + &lt;ACCESS TOKEN HERE&gt;
  req, err := http.NewRequest("GET", url, nil)
  req.Header.Add("authorization", bearer)
  
  client := urlfetch.Client(context)
  
  resp, err := client.Do(req)
  if err != nil {
  panic(err)
  }
  defer resp.Body.Close()
  
  body, _ := ioutil.ReadAll(resp.Body)
  writer.Write([]byte(body)) // Gives 401 Unauthorized error, though same works using POSTMAN
  </code></pre>