 
 
 # returns 20 characters by default
-getRandomString  = (length = 20) ->
+generateRandomString = (length = 20) ->
 
   return hat().slice(32 - length)
 
-
+# _.extend didn't help with deep extend
 # deep extending one object from another, works only for objects
 deepObjectExtend = (target, source) ->
 


module.exports = {
  RegisterHandlerHelper
  getRandomString
}



  # overwrites given options in the default params
  @generatePostParams = (opts = {}) ->

    defaultPostParams = RegisterHandlerHelper.generateDefaultParams()
    postParams        = deepObjectExtend defaultPostParams, opts
    # after deep extending object, encodes body param to a query string
    postParams.body   = querystring.stringify postParams.body
