Getting No Response from API Calls
Posted: Thu Jul 23, 2020 10:07 am
My API calls have been working fine for over a year and just today I'm not getting any response when making a call. It's almost as if the server is not responding.
The requests are hitting the timeout that I have set in curl_setopt($ch, CURLOPT_TIMEOUT, 30); - I've tested it by getting a much quicker failure by setting the timeout to 5 seconds so it seems to be a SimPRO issue
When I run this code through POSTMAN I get the desired response, but when I run it through another server I get a timeout
Ian
The requests are hitting the timeout that I have set in curl_setopt($ch, CURLOPT_TIMEOUT, 30); - I've tested it by getting a much quicker failure by setting the timeout to 5 seconds so it seems to be a SimPRO issue
When I run this code through POSTMAN I get the desired response, but when I run it through another server I get a timeout
Code: Select all
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://testinc.simprosuite.com/api/v1.0/companies/0/employees/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 5,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_3,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/x-www-form-urlencoded",
"Authorization: Bearer *****",
"Cookie: newUIDefault=true; oldUI=false"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;