Skip to content

Commit

Permalink
Merge pull request #105 from odan/patch-1
Browse files Browse the repository at this point in the history
Remove charset on json content-type
  • Loading branch information
l0gicgate committed Nov 15, 2019
2 parents 433f865 + 85918cb commit 13e7b70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Response.php
Expand Up @@ -194,7 +194,7 @@ public function withJson($data, ?int $status = null, int $options = 0, int $dept
}

$response = $this->response
->withHeader('Content-Type', 'application/json;charset=utf-8')
->withHeader('Content-Type', 'application/json')
->withBody($this->streamFactory->createStream($json));

if ($status !== null) {
Expand Down
2 changes: 1 addition & 1 deletion tests/ResponseTest.php
Expand Up @@ -607,7 +607,7 @@ public function testWithJson()

$this->assertNotEquals($response->getStatusCode(), $originalResponse->getStatusCode());
$this->assertEquals(201, $response->getStatusCode());
$this->assertEquals('application/json;charset=utf-8', $response->getHeaderLine('Content-Type'));
$this->assertEquals('application/json', $response->getHeaderLine('Content-Type'));

$body = $response->getBody();
$body->rewind();
Expand Down

0 comments on commit 13e7b70

Please sign in to comment.