{"id":14966452,"url":"https://github.com/yiisoft/request-body-parser","last_synced_at":"2025-08-14T08:07:29.549Z","repository":{"id":37791630,"uuid":"278081365","full_name":"yiisoft/request-body-parser","owner":"yiisoft","description":"Middleware for parsing various data formats","archived":false,"fork":false,"pushed_at":"2024-08-09T11:32:47.000Z","size":90,"stargazers_count":17,"open_issues_count":4,"forks_count":7,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-08-04T21:50:56.878Z","etag":null,"topics":["content-type","hacktoberfest","json","middleware","psr-15","psr-7","xml","yii3"],"latest_commit_sha":null,"homepage":"https://www.yiiframework.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yiisoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"yiisoft","github":["yiisoft"]}},"created_at":"2020-07-08T12:19:36.000Z","updated_at":"2025-07-23T10:35:26.000Z","dependencies_parsed_at":"2023-01-30T01:45:56.664Z","dependency_job_id":"9bc4577a-9405-495a-8b7e-32918b582591","html_url":"https://github.com/yiisoft/request-body-parser","commit_stats":{"total_commits":54,"total_committers":14,"mean_commits":3.857142857142857,"dds":0.6481481481481481,"last_synced_commit":"715fbb290f0f5f5a4b2532f9bd9a248ded9ba749"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"yiisoft/package-template","purl":"pkg:github/yiisoft/request-body-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Frequest-body-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Frequest-body-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Frequest-body-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Frequest-body-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiisoft","download_url":"https://codeload.github.com/yiisoft/request-body-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Frequest-body-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269549068,"owners_count":24436262,"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-08-09T02:00:10.424Z","response_time":111,"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":["content-type","hacktoberfest","json","middleware","psr-15","psr-7","xml","yii3"],"created_at":"2024-09-24T13:36:24.400Z","updated_at":"2025-08-14T08:07:29.459Z","avatar_url":"https://github.com/yiisoft.png","language":"PHP","funding_links":["https://opencollective.com/yiisoft","https://github.com/sponsors/yiisoft"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://yiisoft.github.io/docs/images/yii_logo.svg\" height=\"100px\" alt=\"Yii\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eYii Request Body Parser\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/yiisoft/request-body-parser/v)](https://packagist.org/packages/yiisoft/request-body-parser)\n[![Total Downloads](https://poser.pugx.org/yiisoft/request-body-parser/downloads)](https://packagist.org/packages/yiisoft/request-body-parser)\n[![Build status](https://github.com/yiisoft/request-body-parser/actions/workflows/build.yml/badge.svg)](https://github.com/yiisoft/request-body-parser/actions/workflows/build.yml)\n[![Code coverage](https://codecov.io/gh/yiisoft/request-body-parser/graph/badge.svg?token=9TQJWSE5HQ)](https://codecov.io/gh/yiisoft/request-body-parser)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Frequest-body-parser%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/request-body-parser/master)\n[![static analysis](https://github.com/yiisoft/request-body-parser/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/request-body-parser/actions?query=workflow%3A%22static+analysis%22)\n[![type-coverage](https://shepherd.dev/github/yiisoft/request-body-parser/coverage.svg)](https://shepherd.dev/github/yiisoft/request-body-parser)\n\nThe package is [PSR-15](https://www.php-fig.org/psr/psr-15/) middleware that allows parsing [PSR-7](https://www.php-fig.org/psr/psr-7/)\nserver request body selecting the parser according to the server request mime type.\n\n## Requirements\n\n- PHP 7.4 or higher.\n\n## Installation\n\nThe package could be installed with [Composer](https://getcomposer.org):\n\n```shell\ncomposer require yiisoft/request-body-parser\n```\n\n## General usage\n\n1. Add `RequestBodyParser` to your middleware stack.\n2. Obtain parsed body via `$request-\u003egetParsedBody();`.\n\nBy default, it parses `application/json` requests where JSON is in the body. \n\nYou can add your own parser by implementing `ParserInterface`, adding it into the container and registering it within\nthe middleware:\n\n```php\n$requestBodyParser = $requestBodyParser-\u003ewithParser('application/myformat', MyFormatParser::class);\n``` \n\n## Documentation\n\n- [Internals](docs/internals.md)\n\nIf you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that.\nYou may also check out other [Yii Community Resources](https://www.yiiframework.com/community).\n\n## License\n\nThe Yii Request Body Parser is free software. It is released under the terms of the BSD License.\nPlease see [`LICENSE`](./LICENSE.md) for more information.\n\nMaintained by [Yii Software](https://www.yiiframework.com/).\n\n### Support the project\n\n[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?logo=open%20collective\u0026logoColor=7eadf1\u0026labelColor=555555)](https://opencollective.com/yiisoft)\n\n### Follow updates\n\n[![Official website](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](https://www.yiiframework.com/)\n[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter\u0026logoColor=1DA1F2\u0026labelColor=555555?style=flat)](https://twitter.com/yiiframework)\n[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat\u0026logo=telegram)](https://t.me/yii3en)\n[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat\u0026logo=facebook\u0026logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)\n[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat\u0026logo=slack)](https://yiiframework.com/go/slack)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Frequest-body-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiisoft%2Frequest-body-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Frequest-body-parser/lists"}