lib/Stateless.js
function getRequest(at, api_url, config, callback) {
  if (!config.responseCode)
    config.responseCode = 200;

  request(
    {
      uri:    getURL(at, api_url, config.opts),
      method: 'GET',
      headers: {'Content-Type': 'application/json'}
    },
    function(err,res,body) {
      if (!err && res.statusCode == config.responseCode) {
        if (config.doParse) {
          callback(null,JSON.parse(body).response);    
        } else {
          callback(null,res.statusCode);         
        }
      } else  {
        callback(res)
      }
  });  

}
function getRequest(at, api_url, config, callback) {
  if (!config.responseCode)
    config.responseCode = 200;

  request(
    {
      uri:    getURL(at, api_url, config.opts),
      method: 'GET',
      headers: {'Content-Type': 'application/json'}
    },
    function(err,res,body) {
      if (!err && res.statusCode == config.responseCode) {
        if (config.doParse) {
          callback(null,JSON.parse(body).response);    
        } else {
          callback(null,res.statusCode);         
        }
      } else  {
        callback(res)
      }
  });  

}
function getRequest ( at , api_url , config , callback ) { if ( ! config . responseCode ) config . responseCode = 200 ; request ( { uri : getURL ( at , api_url , config . opts ) , method : 'GET' , headers : { 'Content-Type' : 'application/json' } } , function ( err , res , body ) { if ( ! err && res . statusCode == config . responseCode ) { if ( config . doParse ) { callback ( null , JSON . parse ( body ) . response ) ; } else { callback ( null , res . statusCode ) ; } } else { callback ( res ) } } ) ; }
This makes one of many different types of post requests. config.opts         - this adds additional parameters to the url config.doParse      - if true,  parses the return value as json config.responseCode - if set, checks for this response code
This makes one of many different types of post requests . config . opts - this adds additional parameters to the url config . doParse - if true parses the return value as json config . responseCode - if set checks for this response code