     check method, String
     check callback, Match.Optional Function
 
+    process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
+
     if options?.headers
       options.headers = _.extend @defaultHeaders, options.headers 
     else
       options.headers = @defaultHeaders
 
+    options = _.extend options, timeout: 10000
+
     try
       unless callback
-        return @__httpCallSync method, url, options
+        res = @__httpCallSync method, url, options
+        process.env.NODE_TLS_REJECT_UNAUTHORIZED = NTRU_def
+        return res
       else
-        HTTP.call method, url, options, callback
+        HTTP.call method, url, options, ->
+          process.env.NODE_TLS_REJECT_UNAUTHORIZED = NTRU_def
+          callback.apply @, arguments
     catch error
       console.error error
 

    @base = opts.base or opts.root or opts.path or 'db/data'
    @base = @base.replace(/^\/|\/$/g, '')
    @root = "#{@url}/#{@base}"
    check @base, String

    @__service = {}

NTRU_def = process.env.NODE_TLS_REJECT_UNAUTHORIZED

class Neo4jListener
  constructor: (listener, @_db) ->
    check listener, Function
