The Browserify XHR implementation of Node's http module does not support the IncomingMessage.setEncoding() method. This is causing errors when the SDK is used in a browser. Ideally this should be fixed in Browserify, but until then lets just verify that the method exists before invoking it.
More information about the underlying issue can be found in substack/http-browserify#21.
The Browserify XHR implementation of Node's
http
module does not support theIncomingMessage.setEncoding()
method. This is causing errors when the SDK is used in a browser. Ideally this should be fixed in Browserify, but until then lets just verify that the method exists before invoking it.More information about the underlying issue can be found in substack/http-browserify#21.