Skip to content

Commit 7819629

Browse files
Request(Https): get rid of try catch block in request method.
1 parent 28631cb commit 7819629

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Request/Http.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,8 @@ public function request($options)
138138
$requestMethod = isset($options['method']) ? $options['method'] : 'GET';
139139
$requestURI = isset($options['uri']) ? $options['uri'] : '';
140140

141-
try {
142-
$response = $this->requestClient->request($requestMethod, $requestURI, $options);
143-
$responseContent = (array)json_decode($response->getBody()->getContents());
144-
} catch (\GuzzleHttp\Exception\RequestException $e) {
145-
echo $e;
146-
}
141+
$response = $this->requestClient->request($requestMethod, $requestURI, $options);
142+
$responseContent = (array)json_decode($response->getBody()->getContents());
147143

148144
return isset($responseContent) ? (array)$responseContent['data'] : NULL;
149145
}

0 commit comments

Comments
 (0)