substack/http-browserify — pull request #66 by robertknight (2014-09-06 14:54:05+00:00)
Title: Fix exception when setting XHR responseType parameter

According to the XHR spec (http://xhr.spec.whatwg.org/#the-responsetype-attribute) and
https://bugzilla.mozilla.org/show_bug.cgi?id=707484 it is legal to set the responseType attribute
before opening the request. However, this doesn't work with current versions of Firefox and results
in an exception.

Work around this issue by setting the xhr.responseType attribute only
after opening the request.

Also if the caller explicitly specifies a desired response type, report
an error instead of silently returning an unexpected data type if the
xhr.responseType assignment fails.

Fixes #65