XF 2.1 Call to undefined method GuzzleHttp\Psr7\Response::json()

Jaxel

Well-known member
This is the code I've been using in XF2.0 to do API requests:
Code:
$client = \XF::app()->http()->client();
$response = $client->get($endpoint);
$json = $response->json();

Clearly, XF2.1 has a lot of changes. Apparently changes to Guzzle as well.

How should I be doing these requests in XF2.1?
 
Back
Top Bottom