]);
$a = get_app();
- $return_code = $a->get_curl_code();
+ $return_code = Network::getCurl()->getCode();
// check for success, e.g. 2xx
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
- $return_code = $a->get_curl_code();
+ $return_code = Network::getCurl()->getCode();
}
if ($return_code > 299) {
Network::post($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)]);
- $return_code = $a->get_curl_code();
+ $return_code = Network::getCurl()->getCode();
}
logger('slapper for '.$url.' returned ' . $return_code);
return -1;
}
- if (($return_code == 503) && (stristr($a->get_curl_headers(), 'retry-after'))) {
+ if (($return_code == 503) && (stristr(Network::getCurl()->getHeaders(), 'retry-after'))) {
return -1;
}