nl_tokens: Promise to perform a get request and return the result
pl_tokens: function httpGetPromise ( url ) { var deferred = Q . defer ( ) , get ; var cb = function ( res ) { var data = '' ; res . on ( 'data' , function ( chunk ) { data += chunk ; } ) ; res . on ( 'err' , function ( err ) { debug ( err + ' ' + url ) ; deferred . reject ( err ) ; } ) ; res . on ( 'end' , function ( ) { if ( res . statusCode !== 200 ) { debug ( res . statusCode + ': ' + <mask> ) ; deferred . resolve ( ) ; } else { debug ( 'fetched ' + url ) ; deferred . resolve ( data ) ; } } ) ; } ; if ( url . match ( / ^https / ) ) { get = https . get ( url , cb ) ; } else { get = http . get ( url , cb ) ; } get . on ( 'error' , function ( err ) { deferred . resolve ( ) ; debug ( err + ': ' + url ) ; } ) ; return deferred . promise ; }