Loading api/v1/services.php +5 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ foreach($services as $service) { // normal option you'd also expect when using e.g., Python's `requests` library. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // If the FS server is down on a network level, curl will wait until timeout before responding with a failure. // We set the timeout to 5s (maybe lower would be better), to still give a fast (albeit negative) response // when the FS server is down. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // Append the handle to the array of handles (we need it later to get the response code) and add // it to the multi handle (which we need to make the requests in batch). $handles[] = $ch; Loading Loading
api/v1/services.php +5 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ foreach($services as $service) { // normal option you'd also expect when using e.g., Python's `requests` library. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // If the FS server is down on a network level, curl will wait until timeout before responding with a failure. // We set the timeout to 5s (maybe lower would be better), to still give a fast (albeit negative) response // when the FS server is down. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // Append the handle to the array of handles (we need it later to get the response code) and add // it to the multi handle (which we need to make the requests in batch). $handles[] = $ch; Loading