Sending your first request
Now we will show you how to send a request.
const hyttpo = require('hyttpo').default;
hyttpo.request({
method: 'GET',
url: 'https://api.ipify.org/?format=json'
})
.catch(e => e)
.then(res => {
console.log(res.data)
})
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Output:
{
"ip": "xx.xx.xx.xx"
}
1
2
3
2
3