original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Get stream.
  
  @param string $endpoint
  @param array  $params
  
  @return \EasyWeChat\Kernel\Http\StreamResponse
docstring_tokens: Get stream .