docs: function registerCapabilities( capabilities , options ,callback) {
      if ((!options.host) || (!options.port) || (!options.caFile) || (!options.keyFile) || (!options.certFile))
          callback(new Error("Invalid parameters"), null);
      else{
                                  // New SDK ENVELOPE 05052015
          var post_data = {
                                  "contents":[],
                                  "envelope": "message",
                                  "version": 1
                  };
          capabilities.forEach(function(capability , index){
              // Serialize the capability Object
                                                  //            post_data.push(JSON.parse(capability.to_dict()));
              post_data.contents.push(JSON.parse(capability.to_dict()));          
          });
          var post_options = {
              path: SUPERVISOR_PATH_REGISTER_CAPABILITY
              ,method: 'POST'
              ,host: options.host
              ,port: options.port
              ,ca: ssl_files.readCaChain(options.caFile)
              ,agent: false,
              key: ssl_files.readFileContent(options.keyFile)
              ,cert: ssl_files.readFileContent(options.certFile)
              ,headers: {
                  'Content-Type': MIME_TYPE,
                  'Content-Length': Buffer.byteLength(JSON.stringify(post_data))
                  ,'Accept': '*/*'
              }
          };
          // Set up the request
          var post_req = https.request(post_options, function(res) {
              if (res.statusCode != 200){
                  callback(new Error(res.statusCode), res.statusCode);
              }
              callback(null,res.statusCode );
          });
          post_req.on("error", function(err){
              callback(err,null)
          });
          post_req.write(JSON.stringify( post_data));
          post_req.end();
      }
  }