/** * Response * * this send the request from the built response and * returns the response as a JSON payload */ public function response() { $this->response = $this->client->send($this->request); return $this->response->json(); }
/** * Response * * this send the request from the built response and * returns the response as a JSON payload * returns an array? */ public function response() { $this->response = $this->client->send($this->request); return array_merge($this->response->json(), ['records' => $this->response->getHeader('x-records'), 'pages' => $this->response->getHeader('x-pages'), 'page' => $this->response->getHeader('x-page')]); //return $this->response->json(); }