Answer the question
In order to leave comments, you need to log in
Yii2 api how to be?
if you contact by api then
Invalid Parameter - yii\base\InvalidParamException
Response content must not be an array.
'response' => [
'format' => yii\web\Response::FORMAT_JSON,
'charset' => 'UTF-8',
],
Answer the question
In order to leave comments, you need to log in
Nothing is clear from your question. Try to be more specific.
You went somewhere, got an error that the server response cannot be an array, and this is true. Can not. Then you configured the response as json and your array became a Json string. Everything is logical. What is the problem? Can you describe what you expect to get?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question