Hi,
I use the OAuth2 class to obtain an auth token and then use the api() method to make REST api calls to a server.
The api() method promises to return the response as an array - this is great.
Everything works fine, except as a part of the api() call, the yii\web\Response::prepare() method throws an exception because “Response content must not be an array”.
The REST server returns content via HTTP as JSON. The framework converts this to an array.
I am completely confused why this exception is being thrown… Any ideas?