{"id":23636913,"url":"https://github.com/serviejs/get-body","last_synced_at":"2025-08-31T11:34:06.736Z","repository":{"id":66011063,"uuid":"79956302","full_name":"serviejs/get-body","owner":"serviejs","description":"General HTTP request body parser","archived":false,"fork":false,"pushed_at":"2018-05-19T10:33:58.000Z","size":59,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-11T20:49:00.917Z","etag":null,"topics":["body-parser","buffer","http","json","promises","stream","url-encoded"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serviejs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-24T21:29:36.000Z","updated_at":"2021-05-03T11:43:23.000Z","dependencies_parsed_at":"2023-03-08T16:45:54.347Z","dependency_job_id":null,"html_url":"https://github.com/serviejs/get-body","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.368421052631579,"last_synced_commit":"50b63f2d15c42a89e0d365dcb1e31ff4ea3a1c8e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fget-body","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fget-body/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fget-body/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fget-body/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serviejs","download_url":"https://codeload.github.com/serviejs/get-body/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231590687,"owners_count":18396934,"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":["body-parser","buffer","http","json","promises","stream","url-encoded"],"created_at":"2024-12-28T06:15:26.462Z","updated_at":"2024-12-28T06:15:27.093Z","avatar_url":"https://github.com/serviejs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Body\n\n[![NPM version](https://img.shields.io/npm/v/get-body.svg?style=flat)](https://npmjs.org/package/get-body)\n[![NPM downloads](https://img.shields.io/npm/dm/get-body.svg?style=flat)](https://npmjs.org/package/get-body)\n[![Build status](https://img.shields.io/travis/serviejs/get-body.svg?style=flat)](https://travis-ci.org/serviejs/get-body)\n[![Test coverage](https://img.shields.io/coveralls/serviejs/get-body.svg?style=flat)](https://coveralls.io/r/serviejs/get-body?branch=master)\n\n\u003e General HTTP request body parser.\n\nLooking for a multipart body parser? Try [`busboy`](https://www.npmjs.com/package/busboy).\n\n## Installation\n\n```\nnpm install get-body --save\n```\n\n## Usage\n\n```ts\nimport { parse, json, text, form } from 'get-body'\nimport { createServer } from 'http'\n\ncreateServer(function (req) {\n  parse(req, req.headers).then(body =\u003e console.log(body))\n})\n```\n\n### Arguments\n\n1. `stream: Readable` An instance of the request stream\n2. `headers: object` The raw headers object as a lower-cased map\n3. `options: object` Parser configuration\n\n### Options\n\n* `limit` Controls the maximum request body size (default: `100kb`).\n* `decoders` Map of known `content-encoding` decoders (default: `exports.decoders`)\n* `jsonParse` Custom behaviour for JSON parsing (default: strict `JSON.parse` check)\n* `formParse` Custom behaviour for form parsing (default: `querystring.parse`)\n* `jsonTypes` Array of media types to parse as JSON\n* `formTypes` Array of media types to parse as a form\n* `textTypes` Array of media types to parse as text\n\n## TypeScript\n\nThis project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserviejs%2Fget-body","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserviejs%2Fget-body","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserviejs%2Fget-body/lists"}