Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Commit

Permalink
supported more methods in payload
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed May 6, 2016
1 parent c0014d0 commit d5bc1cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')));

Expand Down

0 comments on commit d5bc1cd

Please sign in to comment.