Skip to content

Commit 4564a92

Browse files
committed
Update Response.php
Added Content-Type header for sendJson method
1 parent 9cfd53b commit 4564a92

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Response.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public function send(int $code = null, string $body = null, array $headers = nul
129129
*/
130130
public function sendJson(int $code = null, $body = null, array $headers = null)
131131
{
132+
$this->withHeader('Content-Type', 'application/json');
132133
if ($body) $this->withBodyJson($body);
133134
return $this->send($code, null, $headers);
134135
}

0 commit comments

Comments
 (0)