Skip to content

Commit

Permalink
Fix $requestOptions for httpRequest method
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Apr 20, 2019
1 parent 4ed7e75 commit 1234485
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 248 deletions.
242 changes: 0 additions & 242 deletions composer.lock

This file was deleted.

8 changes: 2 additions & 6 deletions src/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,11 @@ private static function loadXml($url, $user, $pass)
private static function httpRequest($url, $user, $pass)
{
$client = new Client();
$requestOptions = [];
$requestOption['verify'] = './cacert.pem';
$requestOption['auth'] = [$user, $pass];
$requestOptions['verify'] = __DIR__ . '/cacert.pem';
if($user !== NULL && $pass !== NULL) {
$requestOptions['auth'] = [$user, $pass];
}
$response = $client->request('GET', $url, [
'verify' => __DIR__.'/cacert.pem',
]);
$response = $client->request('GET', $url, $requestOptions);

return $response->getBody()->getContents();
}
Expand Down

0 comments on commit 1234485

Please sign in to comment.