Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 154c56b1 authored by Akhil's avatar Akhil 🙂
Browse files

Copy paste curl service from main to avoid cherry picking mess

parent 694c76e5
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ namespace OCA\EcloudAccounts\Service;
use Exception;

class CurlService {

	private int $lastStatusCode = 0;
	/**
	 * GET alias for request method
	 *
@@ -126,8 +128,10 @@ class CurlService {

		$response = curl_exec($ch);

		$this->lastStatusCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
		

		if ($errno = curl_errno($ch)) {
			var_dump($errno);
			$errorMessage = curl_strerror($errno);
			throw new Exception("Curl error $errno - $errorMessage");
		}