You are not logged in.
Pages: 1
Hello
Here is the link to the full source code: http://git.tholden.no/fason-ans/auto-re … -pmpro.php
When i execute the call to the curl function, the request takes about ten seconds to complete. The same request from POSTMAN, or probably any other
rest client takes a couple of ms.
Do anyone know what could be wrong?
Here is the specific function:
/*
* Function used to execute a curl request
*/
function execute_curl_request($headers = null, $data = null, $url, $type)
{
$send = curl_init($url);
curl_setopt($send, CURLOPT_CUSTOMREQUEST, $type);
curl_setopt($send, CURLOPT_RETURNTRANSFER, true);
if ($headers != null) {
curl_setopt($send, CURLOPT_HTTPHEADER, $headers);
}
if ($data != null) {
curl_setopt($send, CURLOPT_POSTFIELDS, json_encode($data));
}
// Exec the request and decode the result.
$result = json_decode(curl_exec($send));
curl_close($send);
return $result;
}
It is not DNS lookup that takes all the time. I have checked that with get_info().
The only huge numbers in the get_info array is starttransfertime which is 10 seconds.
Last edited by tho068 (2016-01-10 16:48:58)
Offline
API problem. They are looking into it. Thanks.
Offline
Pages: 1