     callback or= () ->
     options.blog = @blog
     options.user_agent = @userAgent
-    @client or= http.createClient @port, @endPoint
-    @postRequest @client, '/1.1/submit-ham', options, (err, status, headers, body) ->
+    @postRequest @endpoint, '/1.1/submit-ham', options, (err, status, headers, body) ->
       callback err
 
 
   # Posts a request to the Akismet API server.
-  postRequest: (client, path, query, callback) ->
+  postRequest: (hostname, path, query, callback) ->
 
-    try
-      query = qs.stringify query
+    query = qs.stringify query
  
-      req = client.request 'POST', path, {
-          'host': client.host
-          'content-type': 'application/x-www-form-urlencoded; charset=' + @charset
-          'content-length': query.length
-          'user-agent': @userAgent
-        }
-      req.write query
-      req.end()
+    options =
+      'method': 'POST'
+      'hostname': hostname
+      'path': path
+      'port': @port
+      'headers':
+        'content-type': 'application/x-www-form-urlencoded; charset=' + @charset
+        'content-length': Buffer.byteLength(query)
+        'user-agent': @userAgent
 
-      if @debug
-        util.log 'Request: ' + util.inspect req
+    req = http.request options, (res) ->
+      res.setEncoding 'utf8'
+      res.on 'data', (body) ->
+        console.log "Query: " + query
+        console.log util.inspect options
+        console.log "Body: " + body
+        callback null, res.statusCode, res.headers, body
 
-      req.on 'response', (res) ->
-        if @debug
-          util.log 'Response: ' + util.inspect res
-        res.setEncoding 'utf-8'
-        res.on 'data', (body) ->
-          callback null, res.statusCode, res.headers, body
+    req.on 'error', (err) ->
+      callback err
 
-    catch err
-      callback err, null, null, null
+
+    req.write query
+    req.end()
 
 
 # Creates and returns a new Akismet client.

    callback or= () ->
    options.blog = @blog
    options.user_agent = @userAgent
    @client or= http.createClient @port, @endPoint
    @postRequest @client, '/1.1/comment-check', options, (err, status, headers, body) ->
      callback err, (if status >= 200 and status < 300 and body is 'true' then true else false)

   

  # callback: err, isValid (true or false)
  verifyKey: (callback) ->
    callback or= () ->
    @postRequest @host, '/1.1/verify-key', { key: @apiKey, blog: @blog }, (err, status, headers, body) ->
      callback err, (if status >= 200 and status < 300 and body is 'valid' then true else false)


