chg: [application] Added bodyParserMiddleware to parse JSON bodies
parent
216d04723f
commit
1f8010a6ec
|
@ -21,6 +21,7 @@ use Cake\Core\Exception\MissingPluginException;
|
|||
use Cake\Error\Middleware\ErrorHandlerMiddleware;
|
||||
use Cake\Http\BaseApplication;
|
||||
use Cake\Http\MiddlewareQueue;
|
||||
use Cake\Http\Middleware\BodyParserMiddleware;
|
||||
use Cake\Routing\Middleware\AssetMiddleware;
|
||||
use Cake\Routing\Middleware\RoutingMiddleware;
|
||||
use Authentication\AuthenticationService;
|
||||
|
@ -28,7 +29,6 @@ use Authentication\AuthenticationServiceInterface;
|
|||
use Authentication\AuthenticationServiceProviderInterface;
|
||||
use Authentication\Middleware\AuthenticationMiddleware;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
/**
|
||||
* Application setup class.
|
||||
*
|
||||
|
@ -87,7 +87,8 @@ class Application extends BaseApplication implements AuthenticationServiceProvid
|
|||
// using it's second constructor argument:
|
||||
// `new RoutingMiddleware($this, '_cake_routes_')`
|
||||
->add(new RoutingMiddleware($this))
|
||||
->add(new AuthenticationMiddleware($this));
|
||||
->add(new AuthenticationMiddleware($this))
|
||||
->add(new BodyParserMiddleware());
|
||||
return $middlewareQueue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue