{"id":18358453,"url":"https://github.com/mrdaano/follow-url-redirects","last_synced_at":"2025-04-06T13:31:34.526Z","repository":{"id":42870878,"uuid":"257642770","full_name":"mrdaano/follow-url-redirects","owner":"mrdaano","description":"With this Node JS package you can follow all redirects from a given url","archived":false,"fork":false,"pushed_at":"2022-12-30T20:16:40.000Z","size":156,"stargazers_count":2,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T00:44:13.950Z","etag":null,"topics":["follow","http","https","redirect","redirecting-requests","redirecting-urls","redirects","url"],"latest_commit_sha":null,"homepage":"","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/mrdaano.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":"2020-04-21T15:52:54.000Z","updated_at":"2023-09-08T18:06:17.000Z","dependencies_parsed_at":"2023-01-31T15:25:22.681Z","dependency_job_id":null,"html_url":"https://github.com/mrdaano/follow-url-redirects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdaano%2Ffollow-url-redirects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdaano%2Ffollow-url-redirects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdaano%2Ffollow-url-redirects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdaano%2Ffollow-url-redirects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdaano","download_url":"https://codeload.github.com/mrdaano/follow-url-redirects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247488527,"owners_count":20946955,"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":["follow","http","https","redirect","redirecting-requests","redirecting-urls","redirects","url"],"created_at":"2024-11-05T22:17:54.170Z","updated_at":"2025-04-06T13:31:34.019Z","avatar_url":"https://github.com/mrdaano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Follow url redirects\n[![NPM version](https://img.shields.io/npm/v/follow-url-redirects)](https://www.npmjs.com/package/follow-url-redirects)\n[![Actions Status](https://github.com/mrdaano/follow-url-redirects/workflows/Node.js%20CI/badge.svg)](https://github.com/mrdaano/follow-url-redirects/actions)\n\nWith this Node JS package you can follow all redirects from a given url.\n\n## Example\nIn this example, a bit.ly link has been created that will eventually lead to google.com.\n\n```javascript\nconst followUrlRedirects = require('follow-url-redirects');\n\nfollowUrlRedirects('https://bit.ly/3cScyDF').then(result =\u003e console.log(result));\n```\nThis example returns the following result:\n```json\n[\n    {\n        \"url\": \"https://bit.ly/3cScyDF\",\n        \"code\": 301,\n        \"cookies\": {},\n        \"queryParams\": {}\n    },\n    {\n        \"url\": \"http://google.com/\",\n        \"code\": 301,\n        \"cookies\": {},\n        \"queryParams\": {}\n    },\n    {\n        \"url\": \"http://www.google.com/\",\n        \"code\": 200,\n        \"cookies\": {},\n        \"queryParams\": {}\n    }\n]\n```\n## Extra options\nThere is also the possibility to add extra options as a 2nd parameter.\n| Option | Default | Description |\n|--------|---------|-------------|\n| timeout | 10000(ms) | When a request takes too long it stops. In this case after 10 seconds |\n| maxRedirects | 10 | The maximum number of redirects. |\n### Example with options\n```javascript\nconst followUrlRedirects = require('follow-url-redirects');\n\nconst options = {\n    timeout: 3 * 1000, // 3 seconds\n    maxRedirects: 5\n};\n\nfollowUrlRedirects('https://bit.ly/3cScyDF', options).then(result =\u003e console.log(result));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdaano%2Ffollow-url-redirects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdaano%2Ffollow-url-redirects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdaano%2Ffollow-url-redirects/lists"}