public static function build(
        $content,
        ExecutionInfos $infos,
        Request\AbstractRequest $request
    ) {
        $response = new Response($request);
        $response->setStatus($infos->status);
        $response->setTransactionTime($infos->transactionTime);
        $response->setExecutionInfos($infos);

        //Populate request headers with all really sent headers
        if (!empty($infos->headers)) {
            self::parseHeaders(
                $infos->headers,
                $request
            );
        }

        //Headers are returned with content, so we extract it
        $content = self::parseHeaders($content, $response);

        $response->setBody($content);

        return $response;
    }