private function parseHttpResponse(string $r): array {
        list($header, $body) = explode("\r\n\r\n", $r, 2);
        if (strpos($header, '100 Continue') !== false) {
            list($header, $body) = explode("\r\n\r\n", $body, 2);
        }
        $headerList = explode("\r\n", $header);
        $statusLine = array_shift($headerList);
        $statusCode = (int) explode(' ', $statusLine)[1];
        $headers = [];
        foreach ($headerList as $header) {
            list($key, $value) = explode(':', $header, 2);
            $headers[$key] = $value;
        }
        return [
            'status'  => $statusCode,
            'headers' => $headers,
            'body'    => $body,
        ];
    }
private function parseHttpResponse(string $r): array {
        list($header, $body) = explode("\r\n\r\n", $r, 2);
        if (strpos($header, '100 Continue') !== false) {
            list($header, $body) = explode("\r\n\r\n", $body, 2);
        }
        $headerList = explode("\r\n", $header);
        $statusLine = array_shift($headerList);
        $statusCode = (int) explode(' ', $statusLine)[1];
        $headers = [];
        foreach ($headerList as $header) {
            list($key, $value) = explode(':', $header, 2);
            $headers[$key] = $value;
        }
        return [
            'status'  => $statusCode,
            'headers' => $headers,
            'body'    => $body,
        ];
    }
@param  string $r

@return array