title: How to have config parameter in axios post request with headers required
body: <p>I was trying to send a post request using axios in my react code which needed both 
  'headers parameter' and 'config parameter' at the same time. I found out that there is two types for writing post requests in axios:</p>
  
  <ol>
  <li><p>axios.post(url, data, config)</p></li>
  <li><p>axios({
      url :url,
      method: 'post',
      headers: headers,
      data: data
  })</p></li>
  </ol>
  
  <p>In type 1 we can't send headers parameter and in type 2 we can't send config parameter.</p>
  
  <p>So is there any way to solve this problem?</p>
  
  <blockquote>
    <p>I solved it using xml httpRequest instead of axios, but I'm curious about the way we could solve it using axios.</p>
  </blockquote>