{"id":17766556,"url":"https://github.com/floatdrop/reque","last_synced_at":"2025-04-01T13:45:09.570Z","repository":{"id":23440789,"uuid":"26804202","full_name":"floatdrop/reque","owner":"floatdrop","description":"PassThrough stream, that handles http(s) requests and have some sweet methods","archived":false,"fork":false,"pushed_at":"2014-11-18T15:15:25.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T12:56:44.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatdrop.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T10:34:36.000Z","updated_at":"2014-11-18T15:15:21.000Z","dependencies_parsed_at":"2022-08-22T01:10:26.651Z","dependency_job_id":null,"html_url":"https://github.com/floatdrop/reque","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Freque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Freque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Freque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Freque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatdrop","download_url":"https://codeload.github.com/floatdrop/reque/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246598086,"owners_count":20802971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T20:32:24.641Z","updated_at":"2025-04-01T13:45:09.551Z","avatar_url":"https://github.com/floatdrop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reque [![Build Status](https://travis-ci.org/floatdrop/reque.svg?branch=master)](https://travis-ci.org/floatdrop/reque)\n\n\u003e Simplified way to handle ClientRequest objects on redirects and timeouts\n\n[![jaltoid](https://cloud.githubusercontent.com/assets/365089/5086026/b45e412c-6f39-11e4-847f-2c07bc2a4874.jpg)](http://www.youtube.com/watch?v=qgJjqwmhN28)\n\n## Usage\n\n```js\nvar Reque = require('reque');\nvar reque = new Reque();\n\n// Get request\n\nreque\n\t.request(req) // emits `request` event\n\t.timeout(30 * 1000); // sets timeout value\n\n// Some time later\n\nreque.request(req); // emits `redirect` event\n```\n\n## API\n\n### Reque()\n\nReturns instance of PassThrough `Stream`.\n\nCreates `Reque` object, that will count redirects.\n\n### Reque.request(req)\n\nStores ClientRequest object `req`. Emits `request` on first call.\n\nIf it was already called `redirect` event will be emitted.\n\n### Reque.timeout(time, [callback])\n\nSets timeout for every request, that passed to `request` method. Calls `callback` on timeout.\n\nIf `callback` is omitted, then `error` event will be fired.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Freque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatdrop%2Freque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Freque/lists"}