You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Owen Voke edited this page Nov 12, 2017
·
3 revisions
Curl is used as our transportation engine for sending Rest API calls. You can configure Curl options as follows:
Configurations
http.<CURL_HEADER>
Replace CURL_HEADER with curl constants.
e.g. http.CURLOPT_CONNECTTIMEOUT = 30
As you can see, any curl constant that needs to be added, needs to be prefixed with http..
By default, there are many configurations set by default. By defining any configuration here would override the default.
Samples
Using sdk_config.ini
;Connection Information[Http]; Add Curl Constants to be configured; The settings provided in configurations would override defaults; if provided in configurationshttp.CURLOPT_CONNECTTIMEOUT = 30
Using config array
$config = array(
'mode' => 'sandbox',
'log.LogEnabled' => true,
'log.FileName' => '../BlockCypher.log',
'log.LogLevel' => 'DEBUG', // PLEASE USE `INFO` LEVEL FOR LOGGING IN LIVE ENVIRONMENTS'validation.level' => 'log',
'http.CURLOPT_CONNECTTIMEOUT' => 30
);