From 922cec7fbc9da1508c18156db7693a6ddad7194e Mon Sep 17 00:00:00 2001 From: Mark Staples Date: Sat, 2 Oct 2021 14:57:43 +1000 Subject: [PATCH] increase default timeout to 120secs (#111) * Update transport.php * Update README.md * Update Wrapper Version * Update HISTORY.md * Update HISTORY.md --- HISTORY.md | 4 ++++ README.md | 2 +- class/base_classes.php | 4 ++-- class/transport.php | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 64fd2ae..d1ed787 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # createsend-php history +## v6.1.2 - 2nd Oct, 2021 + +* Changed local API timeout from 20 secs to 120 secs to cater for changes on get segment subscribers API endpoint. + ## v6.1.1 - 6th May, 2020 * Add PHP 7.4 Support diff --git a/README.md b/README.md index c7c30d4..42dd181 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ $result = $wrap->get_clients(); var_dump($result->response); ``` ## API Call Timeout -You can set your local API call timeout time in createsend-php\class\transport.php line 11, in the CS_REST_CALL_TIMEOUT variable. Currently the default is 20 secs. +You can set your local API call timeout time in createsend-php\class\transport.php line 11, in the CS_REST_CALL_TIMEOUT variable. Currently the default is 120 secs. ## Examples diff --git a/class/base_classes.php b/class/base_classes.php index b904c38..f551dbb 100644 --- a/class/base_classes.php +++ b/class/base_classes.php @@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/transport.php'; require_once dirname(__FILE__).'/log.php'; -defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '6.1.1'); +defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '6.1.2'); defined('CS_HOST') or define('CS_HOST', 'api.createsend.com'); defined('CS_OAUTH_BASE_URI') or define('CS_OAUTH_BASE_URI', 'https://'.CS_HOST.'/oauth'); defined('CS_OAUTH_TOKEN_URI') or define('CS_OAUTH_TOKEN_URI', CS_OAUTH_BASE_URI.'/token'); @@ -314,4 +314,4 @@ function _call($call_options, $method, $route, $data = NULL) { return new CS_REST_Wrapper_Result($call_result['response'], $call_result['code']); } } -} \ No newline at end of file +} diff --git a/class/transport.php b/class/transport.php index 5c64c3f..067aee2 100644 --- a/class/transport.php +++ b/class/transport.php @@ -5,10 +5,10 @@ defined('CS_REST_PUT') or define('CS_REST_PUT', 'PUT'); defined('CS_REST_DELETE') or define('CS_REST_DELETE', 'DELETE'); if (false === defined('CS_REST_SOCKET_TIMEOUT')) { - define('CS_REST_SOCKET_TIMEOUT', 20); + define('CS_REST_SOCKET_TIMEOUT', 120); } if (false === defined('CS_REST_CALL_TIMEOUT')) { - define('CS_REST_CALL_TIMEOUT', 20); + define('CS_REST_CALL_TIMEOUT', 120); } if(!function_exists("CS_REST_TRANSPORT_get_available")) {