browserify / http-browserify

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

support string or buffer bodies in requests #9

Closed max-mapper closed 12 years ago

max-mapper commented 12 years ago

i'd appreciate a look at my type inference to see if you think its clean enough. I have tested this code and it works but there aren't automated tests cause I didn't feel like creating an automated test suite for this repo at this time :)

max-mapper commented 12 years ago

just updated this to fully honor xhr.responseText and return the proper value based on it. also i added a small dependency (which has no other dependencies) for more robust upload data concatenation

max-mapper commented 12 years ago

just updated this to be faster for arraybuffer responses. basically xhr.response will be a growing arraybuffer but on each data event i make a new 'view' on the arraybuffer and emit that so each emit shares the same underlying arraybuffer in memory.

also this is the last commit i'm making to this pull req, you should accept it now!