$content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
- $postResult = DI::httpRequest()->post($dest_url, $envelope, ["Content-Type: " . $content_type]);
+ $postResult = DI::httpRequest()->post($dest_url, $envelope, ['Content-Type' => $content_type]);
$xml = $postResult->getBody();
$curl_stat = $postResult->getReturnCode();
return -9; // timed out
}
- if (($curl_stat == 503) && (stristr($postResult->getHeader(), 'retry-after'))) {
+ if (($curl_stat == 503) && $postResult->inHeader('retry-after')) {
return -10;
}