   # @option options {Boolean} anon if true, the request's anonymous flag
   #   will be set
   # @option options {Object} agents user-provided HTTP & HTTPS agents
-  # @option agents {Object} http the HTTP agent, defaults to {http.Agent}
-  # @option agents {Object} https the HTTPS agent, defaults to {https.Agent}
+  # @option agents {Object} http the HTTP agent, defaults to http.globalAgent
+  # @option agents {Object} https the HTTPS agent, defaults to https.globalAgent
   # @see http://www.w3.org/TR/XMLHttpRequest/#constructors
   # @see http://www.w3.org/TR/XMLHttpRequest/#anonymous-flag
   constructor: (options) ->

  # set HTTP and/or HTTPS agent
  #
  # @param {Object} agents
  # @option agents {Object} http the HTTP agent, defaults to {http.Agent}
  # @option agents {Object} https the HTTPS agent, defaults to {https.Agent}
  setAgents: (agents) ->
    agents = agents or {}
    @_agents = {
      http: agents.http or http.globalAgent,
      https: agents.https or https.globalAgent
    }

  # Sets the XHR's method, URL, synchronous flag, and authentication params.

  # readyState value after the request has been completely processed
  @DONE: 4

  # @property {http.Agent} the agent option passed to HTTP requests
  #
  # NOTE: this is not in the XMLHttpRequest API, and will not work in browsers.
  # It is a stable node-xhr2 API that is useful for testing & going through web-proxies.
  httpAgent: http.globalAgent

  # @property {https.Agent} the agent option passed to HTTPS requests
  #
  # NOTE: this is not in the XMLHttpRequest API, and will not work in browsers.
  # It is a stable node-xhr2 API that is especially useful for testing.
