{"id":18429459,"url":"https://github.com/bigpipe/trailers","last_synced_at":"2025-04-13T21:44:38.492Z","repository":{"id":13140539,"uuid":"15822850","full_name":"bigpipe/trailers","owner":"bigpipe","description":"Automatic Trailer headers for your Node.js","archived":false,"fork":false,"pushed_at":"2016-11-16T20:46:19.000Z","size":8,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-24T17:41:22.183Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigpipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-11T13:23:51.000Z","updated_at":"2015-02-09T15:09:33.000Z","dependencies_parsed_at":"2022-07-21T16:18:49.018Z","dependency_job_id":null,"html_url":"https://github.com/bigpipe/trailers","commit_stats":null,"previous_names":["3rd-eden/trailers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Ftrailers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Ftrailers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Ftrailers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Ftrailers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigpipe","download_url":"https://codeload.github.com/bigpipe/trailers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788869,"owners_count":21161726,"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-11-06T05:17:17.650Z","updated_at":"2025-04-13T21:44:38.450Z","avatar_url":"https://github.com/bigpipe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trailers\n\n[![Build Status](https://travis-ci.org/bigpipe/trailers.png?branch=master)](https://travis-ci.org/bigpipe/trailers)\n\nHTTP is amazing, it has amazing features that most of us aren't using. One of\nthese features are trailing headers. These are headers that can be send after\nyou've already written your initial HTTP headers. The only caveat is that they\nonly work with `transfer-encoding: chunked`, luckly, this is enabled by default\nin Nodejs.\n\n## Installation\n\nThe module can be downloaded from the npm registry:\n\n```\nnpm install --save trailers\n```\n\nThe `--save` tells `npm` to automatically add the installed version to your\n`package.json`\n\n## Usage\n\nWhen using this module, nothing changes how you and program your Node.js\napplications. The only difference is that you can write headers AFTER you've\nwritten the headers of your response. You can still use `res.setHeaders` just\nlike you would normally do.\n\nTo run this module simply include it in your application:\n\n```js\nrequire('trailers');\n```\n\nThat's it. Everything is magically fixed.\n\n## The magic\n\nThe module overrides the prototypes of the `OutgoingMessage` class in Node.js\nwhich is what you get a `Response` object in a HTTP server. The `setHeader`\nmethod is overridden method to check if the headers are already flushed to the\nclient and queues the headers in a new `trailers` object when they are already\nwritten. We override the `end` method so we can flush these headers using the\n`addTrailers` method.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigpipe%2Ftrailers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigpipe%2Ftrailers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigpipe%2Ftrailers/lists"}