title: Setting authorization header in axios
body: <p>I have been trying to make a GET request to the National Park Service API with axios and have tried several ways to set my API key in the request header to no avail. Any assistance will be greatly appreciated. </p>
  
  <p>I have tried:</p>
  
  <pre><code>axios.defaults.headers.common['Authorization'] = "MY-API-KEY";
  axios.get('https://developer.nps.gov/api/v0/parks?parkCode=yell')
  .then((resp) =&gt; {
      console.dir(resp);
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>let config = {'Authorization': 'MY-API-KEY'};
  axios.get('https://developer.nps.gov/api/v0/parks?parkCode=yell', config)
  .then((resp) =&gt; {
      console.dir(resp);
  });
  </code></pre>
  
  <p>and both return a 401. 
  It works when I send the GET request in Postman, where I enter Authorization in the key field, and my API key in the value field. </p>
  
  <p>Thank you.</p>