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

Commit

Permalink
Merge pull request #33 from jpkleemans/patch-1
Browse files Browse the repository at this point in the history
Add PATCH method to Payload middleware
  • Loading branch information
oscarotero committed May 6, 2016
2 parents 36faa7e + ea9a7ad commit c0014d0
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', 'DELETE'], true)) {
if (!$request->getParsedBody() && in_array($request->getMethod(), ['POST', 'PUT', 'PATCH', 'DELETE'], true)) {
$resolver = $this->resolver ?: new Transformers\BodyParser();
$transformer = $resolver->resolve(trim($request->getHeaderLine('Content-Type')));

Expand Down

0 comments on commit c0014d0

Please sign in to comment.