https://github.com/gowork/symfony-json-request
Converts json request body to request array
https://github.com/gowork/symfony-json-request
json php request symfony
Last synced: about 1 year ago
JSON representation
Converts json request body to request array
- Host: GitHub
- URL: https://github.com/gowork/symfony-json-request
- Owner: gowork
- License: mit
- Created: 2020-12-17T11:31:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-12T11:11:06.000Z (over 1 year ago)
- Last Synced: 2025-04-07T16:16:13.274Z (about 1 year ago)
- Topics: json, php, request, symfony
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSON Request Bundle
Converts json request body to request array.
**Starting from Symfony 6.3 there is native [$request->getPayload()](https://symfony.com/blog/new-in-symfony-6-3-request-payload) method that can be used instead of this package**
## Install
```shell
composer require gowork/symfony-json-request
```
## Setup bundle
```php
request->get('content');
}
```
```shell
curl 'controller/path' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"content"s:"test","nick":"test"}'
```