mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-24 07:39:10 -04:00
14 lines
389 B
JavaScript
Executable File
14 lines
389 B
JavaScript
Executable File
var request = require('request');
|
|
|
|
var jar = request.jar();
|
|
jar.setCookie(request.cookie('foo=bar'), 'http://mockbin.com/har');
|
|
jar.setCookie(request.cookie('bar=baz'), 'http://mockbin.com/har');
|
|
|
|
var options = { method: 'POST', url: 'http://mockbin.com/har', jar: 'JAR' };
|
|
|
|
request(options, function(error, response, body) {
|
|
if (error) throw new Error(error);
|
|
|
|
console.log(body);
|
|
});
|