code: function isJSON(res) {
    debug('isJSON: content-type = %s', res.headers['content-type']);
    return (res.headers['content-type'] &&
            /^application\/json/.test(res.headers['content-type']));
  }
docs: /*
  Given a response object determine if it's JSON