mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 17:19:42 -04:00
15 lines
254 B
JavaScript
Executable File
15 lines
254 B
JavaScript
Executable File
var unirest = require('unirest');
|
|
|
|
var req = unirest('GET', 'http://mockbin.com/har');
|
|
|
|
req.headers({
|
|
'x-foo': 'Bar',
|
|
accept: 'application/json',
|
|
});
|
|
|
|
req.end(function(res) {
|
|
if (res.error) throw new Error(res.error);
|
|
|
|
console.log(res.body);
|
|
});
|