 # requests made in Node and in a browser.
 
 httpRequest = (url) ->
-  if NODEJS is on then https.get url else (new Image()).src = url
+  if NODEJS is on then http.get url else (new Image()).src = url
 
 
 # ## Kissmetrics Client

NODEJS = typeof exports isnt 'undefined'


# If we're in Node, require the `https` module for our network requests.
#
# If we're in a browser we'll just use the implicit requests generated by
# `Image().src`. Kissmetrics responds to API requests with an `image/gif`
# content type, so the browser won't throw up any warnings.

https = require 'https' if NODEJS is on


# ## HTTP Request

  #   as a Kissmetrics API endpoint.

  _request: (endpoint) ->
    httpRequest "http://#{@host}:#{@port}/#{endpoint}"


# ### Exports
