1
0
mirror of synced 2024-11-24 22:36:06 +03:00

Merge branch 'master' of github.com:intarocrm/rest-api-client

This commit is contained in:
Grisha Pomadchin 2014-06-20 17:56:36 +04:00
commit e5215e7fcb
2 changed files with 10 additions and 3 deletions

View File

@ -12,8 +12,9 @@ Requirements
Installation 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 ```js
{ {
"require": { "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 Usage
------------ ------------

View File

@ -557,9 +557,11 @@ class RestApi
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, FALSE); 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_RETURNTRANSFER, 1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s
//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
if ($method == 'POST') if ($method == 'POST')
{ {