protected function getStream(string $endpoint, array $params)
    {
        $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]);

        if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) {
            return StreamResponse::buildFromPsrResponse($response);
        }

        return $this->castResponseToType($response, $this->app['config']->get('response_type'));
    }
protected function getStream(string $endpoint, array $params)
    {
        $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]);

        if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) {
            return StreamResponse::buildFromPsrResponse($response);
        }

        return $this->castResponseToType($response, $this->app['config']->get('response_type'));
    }
protected function getStream ( string $ endpoint , array $ params ) { $ response = $ this -> requestRaw ( $ endpoint , 'POST' , [ 'json' => $ params ] ) ; if ( false !== stripos ( $ response -> getHeaderLine ( 'Content-disposition' ) , 'attachment' ) ) { return StreamResponse :: buildFromPsrResponse ( $ response ) ; } return $ this -> castResponseToType ( $ response , $ this -> app [ 'config' ] -> get ( 'response_type' ) ) ; }
Get stream.

@param string $endpoint
@param array  $params

@return \EasyWeChat\Kernel\Http\StreamResponse
Get stream .