 noflo = require 'noflo'
-http = require 'http'
+url = require 'url'
 
 # @runtime noflo-nodejs
 

    datatype: 'object'

  c.inPorts.url.on 'data', (payload) ->
    url = payload
  c.inPorts.start.on 'data', ->
    req = http.request url

    req.end ->
      c.outPorts.request.send req

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

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