Use injected Guzzle client

This commit is contained in:
Ben Speakman 2015-03-14 16:04:47 +00:00
parent 3b668336f0
commit 91499b734a

View file

@ -56,11 +56,9 @@ class WpApi
public function _get($method, array $query = array())
{
$client = new Client();
try {
$response = $client->get($this->endpoint . '/wp-json/' . $method, ['query' => $query]);
$response = $this->client->get($this->endpoint . '/wp-json/' . $method, ['query' => $query]);
$return = [
'results' => $response->json(),