From d5bc1cd2a39d6d1e4a0433dec222e86a86f9db83 Mon Sep 17 00:00:00 2001 From: oscarotero Date: Fri, 6 May 2016 13:54:18 +0200 Subject: [PATCH] supported more methods in payload --- src/Middleware/Payload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Middleware/Payload.php b/src/Middleware/Payload.php index 0c6a1fe..d1149bb 100644 --- a/src/Middleware/Payload.php +++ b/src/Middleware/Payload.php @@ -25,7 +25,7 @@ class Payload */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) { - if (!$request->getParsedBody() && in_array($request->getMethod(), ['POST', 'PUT', 'PATCH', 'DELETE'], true)) { + if (!$request->getParsedBody() && in_array($request->getMethod(), ['POST', 'PUT', 'PATCH', 'DELETE', 'COPY', 'LOCK', 'UNLOCK'], true)) { $resolver = $this->resolver ?: new Transformers\BodyParser(); $transformer = $resolver->resolve(trim($request->getHeaderLine('Content-Type')));