From 58b2b474d81cbe33739c9f67de62f368390f6f03 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 3 Jun 2015 02:04:00 +0200 Subject: [PATCH] Make JSON parameter middleware a bit more generic --- framework/core/src/Api/Middleware/ReadJsonParameters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Api/Middleware/ReadJsonParameters.php b/framework/core/src/Api/Middleware/ReadJsonParameters.php index 6395d805d..ab1b7b950 100644 --- a/framework/core/src/Api/Middleware/ReadJsonParameters.php +++ b/framework/core/src/Api/Middleware/ReadJsonParameters.php @@ -11,7 +11,7 @@ class ReadJsonParameters implements MiddlewareInterface */ public function __invoke(Request $request, Response $response, callable $out = null) { - if (str_contains($request->getHeaderLine('content-type'), 'application/vnd.api+json')) { + if (str_contains($request->getHeaderLine('content-type'), 'json')) { $input = json_decode($request->getBody(), true); foreach ($input as $name => $value) {