diff --git a/README.md b/README.md index 38bb786..5ac218b 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ Requirements Installation ------------ -Add IntaroCRM REST API client in your composer.json: +1) Install [composer](https://getcomposer.org/download/) into the project directory. +2) Add IntaroCRM REST API client in your composer.json: ```js { "require": { @@ -21,6 +22,10 @@ Add IntaroCRM REST API client in your composer.json: } } ``` +3) Use command `php composer.phar update intarocrm/rest-api-client` to install new vendor into `vendor/` folder. + + + Usage ------------ diff --git a/lib/IntaroCrm/RestApi.php b/lib/IntaroCrm/RestApi.php index 0483d45..29a9cb6 100644 --- a/lib/IntaroCrm/RestApi.php +++ b/lib/IntaroCrm/RestApi.php @@ -557,9 +557,11 @@ class RestApi $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FAILONERROR, FALSE); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects + //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s + //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + if ($method == 'POST') { @@ -598,4 +600,4 @@ class RestApi return reset($result); } -} \ No newline at end of file +}