Remove trailing newline from test data
XMLHttpRequest does not have a close method
fix for backslashes in data not encoding correctly
introduce support for http-streaming by not filtering multiple LOADING events following the first one.
Fix: Cannot read property 'headers' of undefined

Occasionally, you will get "Cannot read property 'headers' of undefined" when trying to request a header. It's randomly crashing my daemon - I assume when I get a null response from a server.

This does a couple of extra checks.
Handle 301 redirects
Merge pull request #57 from tomhughes/request-protocol

Fix issues in test-request-protocols
Merge pull request #58 from krisnye/master

fix for backslashes in data not encoding correctly
Merge pull request #59 from mone/master

introduce support for http-streaming by not filtering multiple LOADING e...
Merge pull request #68 from unclespode/patch-2

Fix: Cannot read property 'headers' of undefined
Merge pull request #74 from matthewwithanm/301

Handle 301 redirects
allow http.Agent usage

by passing in an `http.Agent` instance (either `http.globalAgent` or a new instance) to the XMLHttpRequest constructor
make XMLHttpRequeset constructor take an `options` object

Matches the Firefox non-standard extensions API this way, and allows
for future extensions and options if necessary.
Encode response using response Content-Type or overrideMimeType.

overrideMimeType("text/plain; charset=x-user-defined") is the only
value that sets encoding to 'binary'. Any other is 'utf8'.