EDD\HelpScout\Endpoint::respond PHP Method

respond() private method

Set JSON headers, return the given response string
private respond ( string $html, integer $code = 200 )
$html string HTML content of the response
$code integer The HTTP status code to respond with
    private function respond($html, $code = 200)
    {
        $response = array('html' => $html);
        // clear output, some plugins might have thrown errors by now.
        if (ob_get_level() > 0) {
            ob_end_clean();
        }
        status_header($code);
        header("Content-Type: application/json");
        echo json_encode($response);
        die;
    }