Response::json()
Creates a json response with appropriate header and automatic conversion of arrays.
Parameters
Name | Type | Default |
---|---|---|
$body | array |string |
'' |
$code | int |
null |
$pretty | bool |
null |
$headers | array |
[ ] |
Return type
Parent class
Kirby\Cms\Response
inherited from Kirby\Http\Response