Merge branch 'master' of github.com:intarocrm/rest-api-client
This commit is contained in:
commit
e5215e7fcb
@ -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
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -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')
|
||||||
{
|
{
|
||||||
@ -598,4 +600,4 @@ class RestApi
|
|||||||
|
|
||||||
return reset($result);
|
return reset($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user