public static function doesRequestHaveBody(RequestInterface $request)
    {
        if ($request->hasHeader('Transfer-Encoding')) {
            return true;
        };

        if (!$contentLength = $request->getHeader('Content-Length')) {
            return false;
        }

        return 0 < $contentLength[0];
    }