Passing headers with axios POST request

I have written an Axios POST request as recommended from the npm package documentation like: var data = { ‘key1’: ‘val1’, ‘key2’: ‘val2’ } axios.post(Helper.getUserAPI(), data) .then((response) => { dispatch({type: FOUND_USER, data: response.data[0]}) }) .catch((error) => { dispatch({type: ERROR_FINDING_USER}) }) And it works, but now I have modified my backend API to accept headers. Content-Type: … Read more