public function send(SimpleHeaders $headers = null, $die_after = true)
    {
        if ($headers === null) {
            $headers = $this->getHttpHeaders();
        }

        ob_end_clean();

        try {
            $data = $this->getData();
        } catch (\Exception $e) {
            throw $e;
        }
        $headers->outputHeaders($replace = true);
        echo $data;
        if ($die_after) {
            die();
        }
    }
public function send(SimpleHeaders $headers = null, $die_after = true)
    {
        if ($headers === null) {
            $headers = $this->getHttpHeaders();
        }

        ob_end_clean();

        try {
            $data = $this->getData();
        } catch (\Exception $e) {
            throw $e;
        }
        $headers->outputHeaders($replace = true);
        echo $data;
        if ($die_after) {
            die();
        }
    }
public function send ( SimpleHeaders $ headers = null , $ die_after = true ) { if ( $ headers === null ) { $ headers = $ this -> getHttpHeaders ( ) ; } ob_end_clean ( ) ; try { $ data = $ this -> getData ( ) ; } catch ( \ Exception $ e ) { throw $ e ; } $ headers -> outputHeaders ( $ replace = true ) ; echo $ data ; if ( $ die_after ) { die ( ) ; } }
Send the store data via http.

@throws \Exception if error occurs in getData

@param SimpleHeaders $headers
@param bool          $die_after
Send the store data via http .