title: How to change Content-Type to application/json React
body: <p>I'm using axios to get contents from an api. I want to set Content-Type to application/json in React using axios. What needs to be corrected?
  Below is the code for reference.</p>
  
  <pre><code>const config = {
    headers: {
      'Content-Type': 'application/json',
      'accept':'application/json'
    },
  };
  
  export function getDetails(){
      return function (dispatch) {
      return axios.get('url',config)
        .then(response =&gt; {
          if (response.status === 200) {
            console.log("actions ",response.data);
          }
        }).catch(err =&gt; {
  
        });
    }
  }
  </code></pre>