'application/json'], json_encode($responseData) )); } function respond_html(string $html, int $statusCode = 200) { return str(new Response( $statusCode, ['Content-Type' => 'text/html'], $html )); }