Skip to content

Commit

Permalink
Merge pull request #15 from DFoxinator/base_stuff
Browse files Browse the repository at this point in the history
No SSL verify option
  • Loading branch information
DFoxinator authored Mar 6, 2017
2 parents 5a13648 + cf3a4da commit ee535fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Client
const CONFIG_SECURE = 'secure';
const CONFIG_PROTOCOL = 'protocol';
const CONFIG_ERROR_MODE = 'error_mode';
const CONFIG_NO_SSL_VERIFY = 'no_ssl_verify';

const ERROR_MODE_HIDE_ERRORS = 'hide';
const ERROR_MODE_THROW_ERRORS = 'throw';
Expand All @@ -21,6 +22,7 @@ class Client
self::CONFIG_SECURE => false,
self::CONFIG_PROTOCOL => 'http',
self::CONFIG_ERROR_MODE => '',
self::CONFIG_NO_SSL_VERIFY => false,
];

/**
Expand Down Expand Up @@ -184,6 +186,10 @@ private function _sendNeo4jPostRequest( string $endpoint, string $body )
'body' => $body,
];

if (isset($this->_config[self::CONFIG_NO_SSL_VERIFY])) {
$post_options['verify'] = $this->_config[self::CONFIG_NO_SSL_VERIFY];
}

try {
$result = $this->_http_client->post($uri, $post_options);
$result = json_decode($result->getBody()->getContents(), true);
Expand Down

0 comments on commit ee535fd

Please sign in to comment.