src/Leevel/Protocol/Thrift/Service/ThriftHandler.php
protected function normalizeResponse(IResponse $response): Response
    {
        if ($response instanceof RedirectResponse) {
            $content = json_encode(['target_url' => $response->getTargetUrl()]);
        } else {
            $content = $response->getContent();
        }

        return new Response([
            'status' => $response->getStatusCode(),
            'data'   => $content,
        ]);
    }
protected function normalizeResponse(IResponse $response): Response
    {
        if ($response instanceof RedirectResponse) {
            $content = json_encode(['target_url' => $response->getTargetUrl()]);
        } else {
            $content = $response->getContent();
        }

        return new Response([
            'status' => $response->getStatusCode(),
            'data'   => $content,
        ]);
    }
格式化 QueryPHP 响应到 Thrift RPC 响应.

@param \Leevel\Http\Request $response

@return \Leevel\Protocol\Thrift\Service\Response