{"id":15118161,"url":"https://github.com/unjs-archive/requrl","last_synced_at":"2025-09-28T00:30:45.117Z","repository":{"id":40437372,"uuid":"223211675","full_name":"unjs-archive/requrl","owner":"unjs-archive","description":"Grab full URL from request.","archived":false,"fork":false,"pushed_at":"2024-04-29T10:14:48.000Z","size":340,"stargazers_count":37,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-27T15:05:32.333Z","etag":null,"topics":["http","incomingmessage","node","req","url"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/unjs-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T16:01:22.000Z","updated_at":"2025-08-17T20:16:53.000Z","dependencies_parsed_at":"2024-04-29T10:58:10.435Z","dependency_job_id":"7e38da6c-d363-4288-ba99-0d952a65de04","html_url":"https://github.com/unjs-archive/requrl","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":"0.13793103448275867","last_synced_commit":"e564bc6ee6ad4b9bfd73ae42fbd6bc2cdf8906fd"},"previous_names":["nuxt-contrib/requrl","unjs-archive/requrl","unjs/requrl"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/unjs-archive/requrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs-archive%2Frequrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs-archive%2Frequrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs-archive%2Frequrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs-archive%2Frequrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unjs-archive","download_url":"https://codeload.github.com/unjs-archive/requrl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs-archive%2Frequrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277311259,"owners_count":25796890,"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","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["http","incomingmessage","node","req","url"],"created_at":"2024-09-26T01:46:09.280Z","updated_at":"2025-09-28T00:30:44.812Z","avatar_url":"https://github.com/unjs-archive.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# requrl\n\n[![npm](https://flat.badgen.net/npm/v/requrl)](https://www.npmjs.com/package/requrl)\n[![dt](https://flat.badgen.net/npm/dt/requrl)](https://www.npmjs.com/package/requrl)\n[![bundlephobia](https://flat.badgen.net/bundlephobia/minzip/requrl)](https://bundlephobia.com/result?p=requrl)\n\nGrab full URL from [request](https://nodejs.org/api/http.html#http_class_http_incomingmessage).\n\n## Features\n\n- Universal (browser and node.js) support\n- Detect HTTPS requests using [is-https](https://github.com/nuxt-contrib/is-https)\n- Support `x-forwarded-proto` and `x-forwarded-host`\n- Always encode URI\n- Super Small\n\n## Usage\n\n```js\nimport getURL from 'requrl'\n// OR\nconst getURL = require('requrl')\n```\n\nFunction signuture is:\n\n```ts\nfunction getURL(req?: IncomingMessage, includePath?: boolean): string\n```\n\nExample:\n\n```js\nconst url = getURL(req)\n// http://localhost:3000\n// https://www.foo.com\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs-archive%2Frequrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funjs-archive%2Frequrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs-archive%2Frequrl/lists"}