Skip to content

Commit 211d485

Browse files
authored
Update Response.php
1 parent 7eca5e3 commit 211d485

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

system/HTTP/Response.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,10 @@ public function getXML()
536536
* @throws \InvalidArgumentException If the body property is not string or array.
537537
*/
538538
protected function formatBody($body, string $format)
539-
{
540-
$mime = "application/{$format}";
539+
{
540+
$this->bodyFormat = ($format === 'json-unencoded' ? 'json' : $format);
541+
$mime = "application/{$this->bodyFormat}";
541542
$this->setContentType($mime);
542-
$this->bodyFormat = $format;
543543

544544
// Nothing much to do for a string...
545545
if (! is_string($body) || $format === 'json-unencoded')

0 commit comments

Comments
 (0)