On the Stellar development guides it states that using the following code, you can achieve the following:
To create a test account, send Friendbot the public key you created. It’ll create and fund a new account using that public key as the account ID.
var request = require('request');
request.get({
url: 'https://horizon-testnet.stellar.org/friendbot',
qs: { addr: pair.publicKey() },
json: true
}, function(error, response, body) {
if (error || response.statusCode !== 200) {
console.error('ERROR!', error || body);
}
else {
console.log('SUCCESS! You have a new account :)\n', body);
}
});
However it states that the SDK does not have tools for creating test accounts, so I would have to make my own HTTP request.
How do I use this code to do this? For the previous code block on that page to create an account I used node.js but now I have to use a HTTP request? Could anyone help me please.
I have tried using curl "https://horizon-testnet.stellar.org/friendbot?addr=<your-public-key>"
in my terminal.