protected function splitResponseToHeadersArrayAndBody(string $response): HttpResponseInterface
    {
        //        $tmp = explode("\r\n\r\n", $response, 2);
        //        var_export($tmp);
        list($headers, $this->body) = explode("\r\n\r\n", $response, 2);

        $this->headers = $this->getHeaderArray($headers);

        return $this;
    }
protected function splitResponseToHeadersArrayAndBody(string $response): HttpResponseInterface
    {
        //        $tmp = explode("\r\n\r\n", $response, 2);
        //        var_export($tmp);
        list($headers, $this->body) = explode("\r\n\r\n", $response, 2);

        $this->headers = $this->getHeaderArray($headers);

        return $this;
    }
protected function splitResponseToHeadersArrayAndBody ( string $ response ) : HttpResponseInterface { //        $tmp = explode("\r\n\r\n", $response, 2); //        var_export($tmp); list ( $ headers , $ this -> body ) = explode ( "\r\n\r\n" , $ response , 2 ) ; $ this -> headers = $ this -> getHeaderArray ( $ headers ) ; return $ this ; }
Splits the response data to a Headers array and a body

It expects the response data to be in $this->request->response
It puts the headers into $this->headers and
the body into $this->body

@param string $response

@return HttpResponseInterface
Splits the response data to a Headers array and a body