mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-28 01:29:28 -04:00
16 lines
265 B
JavaScript
Executable File
16 lines
265 B
JavaScript
Executable File
var unirest = require('unirest');
|
|
|
|
var req = unirest('POST', 'http://mockbin.com/har');
|
|
|
|
req.headers({
|
|
'content-type': 'text/plain',
|
|
});
|
|
|
|
req.send('Hello World');
|
|
|
|
req.end(function(res) {
|
|
if (res.error) throw new Error(res.error);
|
|
|
|
console.log(res.body);
|
|
});
|