const options = { method: 'POST', headers: { accept: 'application/json' } }; fetch('https://api.leadmagic.io/credits', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));