browserify / http-browserify

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

added request.setTimeout support #80

Open brandonrobertz opened 9 years ago

brandonrobertz commented 9 years ago

This is a port of node's request http setTimeout method.

brandonrobertz commented 9 years ago

I've tested fa18e1f with my target libs. Looking good.

dcousens commented 9 years ago

Could you add a basic test for this? On 27 Jan 2015 2:45 pm, "B Roberts" notifications@github.com wrote:

I've tested fa18e1f https://github.com/substack/http-browserify/commit/fa18e1f5ac707cbe3644abec2404225dedc90820 with my target libs.

— Reply to this email directly or view it on GitHub https://github.com/substack/http-browserify/pull/80#issuecomment-71585361 .

brandonrobertz commented 9 years ago

Yeah, I'll work on something. It's complicated, because so much of this depends on XMLHttpRequest. But it's worth it, so I'll see what I can put together. The existing tests mock out window with stubs, so I think I'll have to take a similar route with xhr.

brandonrobertz commented 9 years ago

I wrote two tests. One to make sure request.setTimeout sets the correct xhr properties and another that simulates xhr timeout activity during send.

brandonrobertz commented 9 years ago

If nobody objects or has comments ... @substack ?

vvo commented 9 years ago

@substack any comments on this? thx

connor4312 commented 7 years ago

Would it be possible to get this merged?

vvo commented 7 years ago

I believe someone willing to do it would have to ask @substack on twitter for repository and maintainer rights on this project. If he feels like he will have the bandwidth and will to do so.

brandonrobertz commented 7 years ago

I spoke with substack on IRC a while back about this and it turns out browserify is now using stream-http when you require('http'). So it looks like this codebase is deprecated?

vvo commented 7 years ago

So it looks like this codebase is deprecated?

Yes if you are using the latest browserify. Some people may not but not sure we need to fix this :)

Then the next step would be to deprecate this module officially in the README, close issues and PRs.