nl_tokens: POST and PUT requests are mostly identical .
pl_tokens: function ( method , where , what , query , callback ) { var opts = { } ; if ( what == undefined ) opts . body = "" ; else opts . body = JSON . stringify ( what ) ; opts . headers = { } ; opts . headers [ 'Content-Length' ] = opts . <mask> . length ; opts . headers [ 'Content-Type' ] = "application/json" ; opts . headers [ 'Authorization' ] = "SSWS " + apiKey ; opts . method = method ; opts . uri = url . parse ( where ) ; if ( query != null ) opts . qs = query ; request ( opts , function ( error , clientResp , resp ) { handleResponse ( error , false , clientResp , resp , callback ) } ) ; }