title: Adding a default HTTP header in Go
body: <p>I'm taking my first steps in Go and would like to consume a REST API. The server requires each request to be authorized with a bearer token.</p>
  
  <p>How can I add this header to the client so that every request uses this token?</p>
  
  <pre><code>import "net/http"
  
  const accessToken = "MY_DEMO_TOKEN"
  
  func main() {
      customHeader := http.Header{}
      customHeader.Add("Authorization: Bearer %s", accessToken)
      client := &amp;http.Client{
          Timeout: time.Second*10,
      }
  }
  </code></pre>