public function createResponse($content = null, array $headers = [])
    {
        $config = $this->responseConfig;
        if (!isset($config['class'])) {
            $config['class'] = Response::className();
        }
        $config['client'] = $this;
        $response = Yii::createObject($config);
        $response->setContent($content);
        $response->setHeaders($headers);
        return $response;
    }
public function createResponse($content = null, array $headers = [])
    {
        $config = $this->responseConfig;
        if (!isset($config['class'])) {
            $config['class'] = Response::className();
        }
        $config['client'] = $this;
        $response = Yii::createObject($config);
        $response->setContent($content);
        $response->setHeaders($headers);
        return $response;
    }
public function createResponse ( $ content = null , array $ headers = [ ] ) { $ config = $ this -> responseConfig ; if ( ! isset ( $ config [ 'class' ] ) ) { $ config [ 'class' ] = Response :: className ( ) ; } $ config [ 'client' ] = $ this ; $ response = Yii :: createObject ( $ config ) ; $ response -> setContent ( $ content ) ; $ response -> setHeaders ( $ headers ) ; return $ response ; }
Creates a response instance.
@param string $content raw content
@param array $headers headers list.
@return Response request instance.
@throws \yii\base\InvalidConfigException
Creates a response instance .