const fetch = require('node-fetch') const rawResponse = fetch('https://faucet.altnet.rippletest.net/accounts', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, }).then(raw => { raw.json().then(content => { console.log ({ secret: content.account.secret, address: content.account.address }); }) });