src/Leevel/Protocol/Client/Rpc.php
protected function normalizeResponse(Response $response): IResponse
    {
        if ($this->isJson($response->data)) {
            $data = json_decode($response->data, true);

            if (isset($data['target_url'])) {
                return new RedirectResponse($data['target_url'], $response->status);
            }

            return JsonResponse::fromJsonString($response->data, $response->status);
        }

        return new HttpResponse($response->data, $response->status);
    }
protected function normalizeResponse(Response $response): IResponse
    {
        if ($this->isJson($response->data)) {
            $data = json_decode($response->data, true);

            if (isset($data['target_url'])) {
                return new RedirectResponse($data['target_url'], $response->status);
            }

            return JsonResponse::fromJsonString($response->data, $response->status);
        }

        return new HttpResponse($response->data, $response->status);
    }
格式化 Thrift Rpc 响应到 QueryPHP 响应.

@param \Leevel\Protocol\Thrift\Service\Response $response

@return \Leevel\Http\IResponse