Skip to content

Commit

Permalink
increase default timeout to 120secs (#111)
Browse files Browse the repository at this point in the history
* Update transport.php

* Update README.md

* Update Wrapper Version

* Update HISTORY.md

* Update HISTORY.md
  • Loading branch information
markstaples authored Oct 2, 2021
1 parent ee84a90 commit 922cec7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions class/base_classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -314,4 +314,4 @@ function _call($call_options, $method, $route, $data = NULL) {
return new CS_REST_Wrapper_Result($call_result['response'], $call_result['code']);
}
}
}
}
4 changes: 2 additions & 2 deletions class/transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit 922cec7

Please sign in to comment.