index.js
function(setArr, cb){
            if(typeof setArr === "string")
                var postData = querystring.stringify([setArr]);
            else if(typeof setArr === "object" || typeof setArr === "array")
                var postData = querystring.stringify(setArr);
            
            var options = {
                host: urlArr.hostname,
                path: "/set",
                port: urlArr.port,
                method: 'POST',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                    'Content-Length': Buffer.byteLength(postData)
                }
            };
                                    
            var postRequest = protocol.request(options, function(res){
                var result = "";
                
                if(res.statusCode === 200){
                    res.on('error', function(error) {
                        if(typeof cb === "function")
                            cb(error);
                    });
                            
                    res.on('data', function (chunk) {
                        result += chunk;
                    });

                    res.on('end', function (chunk) {
                        if(typeof cb === "function"){
                            var resultObj = JSON.parse(result);
                            var err = (resultObj.status === "error") ? resultObj["msg"] : null;
                            cb(err, resultObj);
                        }    
                    });
                }
                else{
                    if(typeof cb === "function")
                        cb("Request return HTTP "+res.statusCode);
                }
            });
                        
            postRequest.write(postData);
            postRequest.end();
        }
function(setArr, cb){
            if(typeof setArr === "string")
                var postData = querystring.stringify([setArr]);
            else if(typeof setArr === "object" || typeof setArr === "array")
                var postData = querystring.stringify(setArr);
            
            var options = {
                host: urlArr.hostname,
                path: "/set",
                port: urlArr.port,
                method: 'POST',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                    'Content-Length': Buffer.byteLength(postData)
                }
            };
                                    
            var postRequest = protocol.request(options, function(res){
                var result = "";
                
                if(res.statusCode === 200){
                    res.on('error', function(error) {
                        if(typeof cb === "function")
                            cb(error);
                    });
                            
                    res.on('data', function (chunk) {
                        result += chunk;
                    });

                    res.on('end', function (chunk) {
                        if(typeof cb === "function"){
                            var resultObj = JSON.parse(result);
                            var err = (resultObj.status === "error") ? resultObj["msg"] : null;
                            cb(err, resultObj);
                        }    
                    });
                }
                else{
                    if(typeof cb === "function")
                        cb("Request return HTTP "+res.statusCode);
                }
            });
                        
            postRequest.write(postData);
            postRequest.end();
        }
function ( setArr , cb ) { if ( typeof setArr === "string" ) var postData = querystring . stringify ( [ setArr ] ) ; else if ( typeof setArr === "object" || typeof setArr === "array" ) var postData = querystring . stringify ( setArr ) ; var options = { host : urlArr . hostname , path : "/set" , port : urlArr . port , method : 'POST' , headers : { 'Content-Type' : 'application/x-www-form-urlencoded' , 'Content-Length' : Buffer . byteLength ( postData ) } } ; var postRequest = protocol . request ( options , function ( res ) { var result = "" ; if ( res . statusCode === 200 ) { res . on ( 'error' , function ( error ) { if ( typeof cb === "function" ) cb ( error ) ; } ) ; res . on ( 'data' , function ( chunk ) { result += chunk ; } ) ; res . on ( 'end' , function ( chunk ) { if ( typeof cb === "function" ) { var resultObj = JSON . parse ( result ) ; var err = ( resultObj . status === "error" ) ? resultObj [ "msg" ] : null ; cb ( err , resultObj ) ; } } ) ; } else { if ( typeof cb === "function" ) cb ( "Request return HTTP " + res . statusCode ) ; } } ) ; postRequest . write ( postData ) ; postRequest . end ( ) ; }
Function do set links to watch

@param array setArr
@param function cb
@return void
Function do set links to watch