{"id":13411383,"url":"https://github.com/BackendStack21/on-http-end","last_synced_at":"2025-03-14T17:30:44.923Z","repository":{"id":57156371,"uuid":"189090207","full_name":"BackendStack21/on-http-end","owner":"BackendStack21","description":"Allows to capture HTTP response content and headers on request end.","archived":false,"fork":false,"pushed_at":"2023-04-07T19:57:07.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-20T03:19:57.822Z","etag":null,"topics":["end","headers","http","response","stream"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BackendStack21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"custom":"https://www.paypal.me/kyberneees"}},"created_at":"2019-05-28T19:26:48.000Z","updated_at":"2024-06-19T04:12:04.565Z","dependencies_parsed_at":"2024-06-19T04:12:01.171Z","dependency_job_id":"6c750ee4-05ae-4e21-bf88-1ed9ff1589b7","html_url":"https://github.com/BackendStack21/on-http-end","commit_stats":null,"previous_names":["jkyberneees/on-http-end"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendStack21%2Fon-http-end","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendStack21%2Fon-http-end/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendStack21%2Fon-http-end/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendStack21%2Fon-http-end/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BackendStack21","download_url":"https://codeload.github.com/BackendStack21/on-http-end/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243618603,"owners_count":20320265,"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":["end","headers","http","response","stream"],"created_at":"2024-07-30T20:01:13.295Z","updated_at":"2025-03-14T17:30:44.667Z","avatar_url":"https://github.com/BackendStack21.png","language":"JavaScript","readme":"# on-http-end\nAllows to capture HTTP response content and headers on request end.\n\u003e Inspired by: https://github.com/kwhitley/apicache/blob/master/src/apicache.js\n\n## Install\n```bash\nnpm i on-http-end\n```\n\n## Usage\n```js\nconst onEnd = require('on-http-end')\nconst http = require('http')\n\nconst server = http.createServer((req, res) =\u003e {\n  onEnd(res, (payload) =\u003e {\n    console.log(payload)\n  })\n\n  res.setHeader('my-header', 'value')\n  res.end('Hello Word!', 'utf-8')\n})\n\nserver.listen(3000)\n```\n\nOutput:\n```bash\n{\n  status: 200,\n  headers: [Object: null prototype] { 'my-header': 'value' },\n  data: 'Hello Word!',\n  encoding: 'utf-8'\n}\n```\n\n## Want to contribute?\nThis is your repo ;)\n\n\u003e Note: We aim to be 100% code coverage, please consider it on your pull requests.","funding_links":["https://www.paypal.me/kyberneees"],"categories":["Web Development"],"sub_categories":["Javascript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBackendStack21%2Fon-http-end","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBackendStack21%2Fon-http-end","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBackendStack21%2Fon-http-end/lists"}