Skip to content

Commit d39d41c

Browse files
committed
fix: replace deprecated getHTTPClientService with IClientService (f4353eb)
1 parent 25228da commit d39d41c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/RemoteInstance.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
use OCA\Files_Sharing\External\Storage as SharingExternalStorage;
3333
use OCP\Files\File;
34+
use OCP\Http\Client\IClientService;
3435

3536
/**
3637
* Remote instance manager
@@ -139,7 +140,7 @@ public static function healthCheck($remote) {
139140
return self::$healthRemote[$remote];
140141
}
141142

142-
$httpClientService = \OC::$server->getHTTPClientService();
143+
$httpClientService = \OC::$server->get(IClientService::class);
143144
$client = $httpClientService->newClient();
144145

145146
$status = false;
@@ -183,7 +184,7 @@ public static function getRemoteKey($file) {
183184
$shareToken = $file->getStorage()->getToken();
184185
$internalPath = $file->getInternalPath();
185186

186-
$httpClientService = \OC::$server->getHTTPClientService();
187+
$httpClientService = \OC::$server->get(IClientService::class);
187188
$client = $httpClientService->newClient();
188189

189190
try {
@@ -236,7 +237,7 @@ public static function lockRemoteKey($file, $lock, $fs) {
236237
$shareToken = $file->getStorage()->getToken();
237238
$internalPath = $file->getInternalPath();
238239

239-
$httpClientService = \OC::$server->getHTTPClientService();
240+
$httpClientService = \OC::$server->get(IClientService::class);
240241
$client = $httpClientService->newClient();
241242
$data = [
242243
"timeout" => 5,

0 commit comments

Comments
 (0)