I am writing a web application that generates a report from Bing Ads API, following the example seen here:
I have the code compiled, however when running, the server abruptly ends the request and returns ERR_INCOMPLETE_CHUNKED_ENCODING right at the beginning of this code block:
$waitTime = 30 * 1;
$reportRequestStatus = null;
// This sample polls every 30 seconds up to 5 minutes.
// In production you may poll the status every 1 to 2 minutes for up to one hour.
// If the call succeeds, stop polling. If the call or
// download fails, the call throws a fault.
for ($i = 0; $i < 10; $i++)
{
sleep($waitTime);
// PollGenerateReport helper method calls the corresponding Bing Ads service operation
// to get the report request status.
$reportRequestStatus = PollGenerateReport(
$proxy,
$reportRequestId
);
if ($reportRequestStatus->Status == ReportRequestStatusType::Success ||
$reportRequestStatus->Status == ReportRequestStatusType::Error)
{
break;
}
}
I have tried to print out values and debug it line by line, but I cannot figure out what's causing this error. Googling the error doesn't bring up anything relevant either. I was wondering if anyone else has encountered this error before, and could tell me what is causing it?
Thanks!