     datatype: 'object'
 
   c.inPorts.url.on 'data', (payload) ->
-    url = payload
+    options = payload
+    if typeof options is 'string'
+      options = url.parse(options)
+
+    protocol = options.protocol
+
+    switch protocol
+      when 'http:' then http = require('http')
+      when 'https:' then http = require('https')
+
   c.inPorts.start.on 'data', ->
-    req = http.request url
+    req = http.request options
 
     req.end ->
       c.outPorts.request.send req

noflo = require 'noflo'
http = require 'http'

# @runtime noflo-nodejs


  c.icon = 'cog'
  c.description = 'Send request'

  options = null
  req = null
  http = null
  # Add input ports
  c.inPorts.add 'url',
    datatype: 'all'
