public setJsonContent (mixed $content, [mixed $jsonOptions], [mixed $depth])
Sets HTTP response body. The parameter is automatically converted to JSON and also sets default header: Content-Type: “application/json; charset=UTF-8”
1 | $response ->setJsonContent( array ( "status" => "OK" )); |
Please login to continue.