 
         if options.url
             #console.log url.parse options.url
-            {auth, hostname, port, path} = url.parse options.url
+            {auth, hostname, port, path, protocol} = url.parse options.url
             if auth
                 options.auth = auth
+            options.protocol = protocol
             options.host = hostname
             options.port = port
             options.path = path


            #console.log options

            req = http.request options, (res)->

                tools.readResponse res, fn

            req.on 'error', fn

            req.write data

    ##
    ##


http = require 'http'
https = require 'https'
url = require 'url'

qs = require 'querystring'
