browserify / http-browserify

node's http module, but for the browser
MIT License
244 stars 110 forks source link

Give to FF a chance to set the ‘xhr.responseType’ #74

Open enricostara opened 9 years ago

enricostara commented 9 years ago

Give to FireFox a chance to set the xhr.responseType = 'arraybuffer' on async request. See also: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data

enricostara commented 9 years ago

You can receive a null response body if try to do a request to an unreachable site. So we need to check first if the response body is defined. You can find a test here: https://github.com/enricostara/telegram-mt-node/blob/master/test/net/http-connection.test.js