{"id":35383109,"url":"https://github.com/pirxpilot/connect-reqres","last_synced_at":"2026-01-20T16:32:45.625Z","repository":{"id":273131836,"uuid":"918801214","full_name":"pirxpilot/connect-reqres","owner":"pirxpilot","description":"Common request and response helpers expected by most Connnect/Express middleware.","archived":false,"fork":false,"pushed_at":"2025-11-03T16:36:24.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-03T18:30:07.995Z","etag":null,"topics":[],"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/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-18T22:13:44.000Z","updated_at":"2025-11-03T16:36:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"a82c04bd-f445-4b73-b941-71a2f7cc4941","html_url":"https://github.com/pirxpilot/connect-reqres","commit_stats":null,"previous_names":["pirxpilot/connect-reqres"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pirxpilot/connect-reqres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fconnect-reqres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fconnect-reqres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fconnect-reqres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fconnect-reqres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/connect-reqres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fconnect-reqres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-02T05:48:32.226Z","updated_at":"2026-01-20T16:32:45.604Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n# connect-reqres\n\nCommon request and response helpers expected by most Connnect/Express middleware.\n\n## Install\n\n```sh\n$ npm install --save connect-reqres\n```\n\n## Usage\n\n```js\nconst app = require('connect');\nconst reqres = require('connect-reqres');\n\napp.use(reqres({\n  app\n}));\n\n```\n\n`reqres(options)` - returns middleware function\n\n`options.app` - is a reference to `connect` app that is exposed as `req.app` property\n`options.querystring` - is an object that provides `parse` method use to parse URL query string - by default `node:querystring` is used\n`options.trustProxy` - if falsy `reqres` will ignore `x-forwarded-host` and `x-forwarded-proto` headers - by default it is true\n\nThe `reqres` middleware decorates `request` and `response` objects.\nRequest decorations include:\n- methods:\n  - `header()`\n  - `get()` alias for `header`\n- properties:\n  - `app`\n  - `host`\n  - `hostname`\n  - `path`\n  - `protocol`\n  - `res` - back reference to back\n  - `query`\n  - `secure`\n\nResponse decorations include:\n- methods:\n  - `clearCookie()`\n  - `cookie()`\n  - `header()`\n  - `json()`\n  - `redirect()`\n  - `send()`\n  - `sendStatus()`\n- properties:\n  - `locals`\n\n\n## License\n\nMIT © [Damian Krzeminski](https://pirxpilot.me)\n\n[npm-image]: https://img.shields.io/npm/v/connect-reqres\n[npm-url]: https://npmjs.org/package/connect-reqres\n\n[build-url]: https://github.com/pirxpilot/connect-reqres/actions/workflows/check.yaml\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/connect-reqres/check.yaml?branch=main\n\n[deps-image]: https://img.shields.io/librariesio/release/npm/connect-reqres\n[deps-url]: https://libraries.io/npm/connect-reqres\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fconnect-reqres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fconnect-reqres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fconnect-reqres/lists"}