Skip to content

Instantly share code, notes, and snippets.

@hdurdle
Created January 9, 2017 23:09
Show Gist options
  • Save hdurdle/76693513d8d043c8fccb19750e4a5bc1 to your computer and use it in GitHub Desktop.
Save hdurdle/76693513d8d043c8fccb19750e4a5bc1 to your computer and use it in GitHub Desktop.
var request = require('request');
var json = {
id: '1',
jsonrpc: '2.0',
method: 'GUI.ShowNotification',
params: {
title: 'title-test',
message: 'message-test'
}
}
request({
url: 'http://tranquil:3005/jsonrpc',
method: 'POST',
json: json
}, function(error, response, body) {
if (error) {
console.log(error);
} else {
console.log(response.statusCode, body);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment