Text Response Formatter for Yii
This package provides a single class,
which is a response formatter allowing to format a given data into a plain text response content and set the "Content-Type" header as
From a command prompt, run:
$ composer require cedx/yii2-text-responses
Now in your application configuration file, you can use the following response formatter:
return [ 'components' => [ 'response' => [ 'formatters' => [ 'text' => 'yii\web\TextResponseFormatter' ] ] ] ];
Text Response Formatter for Yii is distributed under the Apache License, version 2.0.