Skip to content

Commit 829dde6

Browse files
committed
chore: Move away rom getHTTPClientService
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent ab1af05 commit 829dde6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Controller/OCSController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use OCP\Files\Folder;
2424
use OCP\Files\IRootFolder;
2525
use OCP\Files\NotFoundException;
26+
use OCP\Http\Client\IClientService;
2627
use OCP\IRequest;
2728
use OCP\IURLGenerator;
2829
use OCP\Share\Exceptions\ShareNotFound;
@@ -37,6 +38,7 @@ public function __construct(
3738
string $appName,
3839
IRequest $request,
3940
private IRootFolder $rootFolder,
41+
private IClientService $clientService,
4042
private $userId,
4143
private DirectMapper $directMapper,
4244
private IURLGenerator $urlGenerator,
@@ -105,7 +107,7 @@ public function createPublic(
105107

106108
$wopi = $this->tokenManager->newInitiatorToken($host, null, $shareToken, true, $this->userId);
107109

108-
$client = \OC::$server->getHTTPClientService()->newClient();
110+
$client = $this->clientService->newClient();
109111
try {
110112
$response = $client->post(rtrim($host, '/') . '/ocs/v2.php/apps/richdocuments/api/v1/direct/share/initiator?format=json', [
111113
'body' => [

0 commit comments

Comments
 (0)