We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7eca5e3 commit 211d485Copy full SHA for 211d485
1 file changed
system/HTTP/Response.php
@@ -536,10 +536,10 @@ public function getXML()
536
* @throws \InvalidArgumentException If the body property is not string or array.
537
*/
538
protected function formatBody($body, string $format)
539
- {
540
- $mime = "application/{$format}";
+ {
+ $this->bodyFormat = ($format === 'json-unencoded' ? 'json' : $format);
541
+ $mime = "application/{$this->bodyFormat}";
542
$this->setContentType($mime);
- $this->bodyFormat = $format;
543
544
// Nothing much to do for a string...
545
if (! is_string($body) || $format === 'json-unencoded')
0 commit comments