Body parsing middleware for snicco/http-routing
This package provides middleware for snicco/http-routing
to transform
the request body to a plain array
.
Currently, a JsonToArray
middleware is provided.
You can build your own middleware by extending the abstract Payload
middleware.
composer require snicco/payload-middleware
This middleware can either be added globally, in certain groups or on a per-route basis. Choose what works best for you.
use Snicco\Middleware\Payload\JsonToArray;
$configurator->get('route1', '/route1', SomeController::class)
->middleware(JsonToArray::class);
This repository is a read-only split of the development repo of the Snicco project.
This is how you can contribute.
Please report issues in the Snicco monorepo.
If you discover a security vulnerability, please follow our disclosure procedure.