From 3348effd37ea2089418939a0be0813ca3ace0518 Mon Sep 17 00:00:00 2001 From: Mike Garde Date: Thu, 3 Nov 2016 09:40:49 -0400 Subject: [PATCH] Adding debugging param - format fix --- src/Http/Request.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Http/Request.php b/src/Http/Request.php index f1639a7..1e2a048 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -82,8 +82,8 @@ function requestAccessToken() ], ], ], [ - 'http_errors' => false, - ]); + 'http_errors' => false, + ]); } catch (RequestException $e) { @@ -122,6 +122,11 @@ function makeRequest($method, $url, $apiRequest = null, $queryString = null) //we want to see the url being called $this->climate->out($this->config->getLoggerPrefix() . 'URL: ' . $urlEndPoint); + if (!isset($queryString['XDEBUG_SESSION_START'])) + { + $queryString['XDEBUG_SESSION_START'] = 'apinext'; + } + $data = [ 'headers' => [ 'Authorization' => 'Bearer ' . $this->config->getAccessToken(), @@ -187,7 +192,7 @@ function makeRequest($method, $url, $apiRequest = null, $queryString = null) private function printError(RequestException $requestException) { - $error = $error = json_decode($requestException->getResponse()->getBody(), true); + $error = json_decode($requestException->getResponse()->getBody(), true); if (!is_null($error) && isset($error['error'])) {