Skip to content

Commit 5122067

Browse files
committed
Set application/json content type when we return JSON
1 parent e80faf5 commit 5122067

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ResultEncoder/ResultEncoder.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ public function encode($action_result, ServerRequestInterface $request, Response
6363
return $action_result->render($response);
6464
}
6565

66-
if (empty($response->getHeader('content-type'))) {
67-
$response = $response->withHeader('Content-Type', 'application/json;charset=UTF-8');
68-
}
66+
$response = $response->withHeader('Content-Type', 'application/json;charset=UTF-8');
6967

7068
// NULL
7169
if ($action_result === null) {

0 commit comments

Comments
 (0)