The Best Kept Secret in the JDK - VisualVM

less than 1 minute read

We recently started up a new game of VGAPlanets and upon discovering the api I thought it would be fun, and a learning experience to create a hubot-script to access game information.

hubot runs on node.js and is written in CoffeeScript. VGAPlanets returns all data as gzip compressed. Finding any information on how to handle


var http = require('http');
var options = { 
  host: '', 
  port: 80, 
  path: '/game/loadinfo?gameid=815',
  headers: {
    "Accept-Encoding": "gzip"

var zlib = require('zlib');

http.get(options, function(res) {
  var gunzip = zlib.createGunzip();
  gunzip.on('data', function(data) {
}).on('error', function(e) { console.log('error ' + e); });