APIRequest = (url, data = {}, method = 'post') => {
  return new Promise((resolve, reject) => {
    axios[method](url, data)
      .then(resp => resolve(resp))
      .catch(err => reject(err))
  })
}
Request a response from an API endpoint.
@param {String} url Url to get response from
@param {Object} data Optional data to pass
@param {String} method Method type. Default is post