How to render yii\widgets\ListView with data from yii\httpclient\Client::send() [yii\web\Response

The response headers and content. I suppose it would somehow have to be converted to DataProvider or Array.

I managed it with (as I remember):


$array = yii\web\response::$headers->toArray();

$array[‘content’] = yii\web\response::$content;

$dataProvider = yii\data\ArrayDataProvider::$models = $array;


yii\widgets\ListView::$dataProvider = $dataProvider;


But I finally decided that, as yii\web\response is a string, to just nl2br($response) in the view. And dismiss ListView altogether.