http-browserify icon indicating copy to clipboard operation
http-browserify copied to clipboard

added request.setTimeout support

Open brandonrobertz opened this issue 9 years ago • 10 comments

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

brandonrobertz avatar Jan 27 '15 02:01 brandonrobertz

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

brandonrobertz avatar Jan 27 '15 03:01 brandonrobertz

Could you add a basic test for this? On 27 Jan 2015 2:45 pm, "B Roberts" [email protected] 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 .

dcousens avatar Jan 27 '15 04:01 dcousens

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 avatar Jan 27 '15 04:01 brandonrobertz

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 avatar Jan 28 '15 01:01 brandonrobertz

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

brandonrobertz avatar Jan 29 '15 00:01 brandonrobertz

@substack any comments on this? thx

vvo avatar Mar 06 '15 16:03 vvo

Would it be possible to get this merged?

connor4312 avatar Sep 24 '16 21:09 connor4312

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.

vvo avatar Sep 26 '16 07:09 vvo

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?

brandonrobertz avatar Sep 28 '16 03:09 brandonrobertz

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.

vvo avatar Sep 28 '16 07:09 vvo