diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index bab93dff..286d8012 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -17,7 +17,6 @@ use Friendica\DI; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; -use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Util\DateTimeFormat; use Friendica\Util\XML; @@ -193,7 +192,7 @@ EOT; Logger::debug('dwpost: data: ' . $xml); if ($dw_blog !== 'test') { - $x = DI::httpClient()->post($dw_blog, $xml, HttpClientAccept::DEFAULT, ['Content-Type' => 'text/xml'])->getBody(); + $x = DI::httpClient()->post($dw_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::info('posted to dreamwidth: ' . ($x) ? $x : ''); diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 832dff2c..79cd75c8 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -16,7 +16,6 @@ use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Model\Tag; use Friendica\Model\User; -use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Util\DateTimeFormat; use Friendica\Util\XML; @@ -187,7 +186,7 @@ EOT; Logger::debug('ijpost: data: ' . $xml); if ($ij_blog !== 'test') { - $x = DI::httpClient()->post($ij_blog, $xml, HttpClientAccept::DEFAULT, ['Content-Type' => 'text/xml'])->getBody(); + $x = DI::httpClient()->post($ij_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::info('posted to insanejournal: ' . $x ? $x : ''); } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 2fa5e782..073a977e 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -17,7 +17,6 @@ use Friendica\DI; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; -use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Util\DateTimeFormat; use Friendica\Util\XML; @@ -207,7 +206,7 @@ EOT; Logger::debug('ljpost: data: ' . $xml); if ($lj_blog !== 'test') { - $x = DI::httpClient()->post($lj_blog, $xml, HttpClientAccept::DEFAULT, ['Content-Type' => 'text/xml'])->getBody(); + $x = DI::httpClient()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::info('posted to livejournal: ' . ($x) ? $x : ''); } diff --git a/webdav_storage/src/WebDav.php b/webdav_storage/src/WebDav.php index 2e6b5b4e..1a31a4c2 100644 --- a/webdav_storage/src/WebDav.php +++ b/webdav_storage/src/WebDav.php @@ -86,7 +86,7 @@ class WebDav implements ICanWriteToStorage */ protected function exists(string $uri): bool { - return $this->client->head($uri, HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $this->authOptions])->getReturnCode() == 200; + return $this->client->head($uri, [HttpClientOptions::AUTH => $this->authOptions])->getReturnCode() == 200; } /** @@ -178,7 +178,7 @@ class WebDav implements ICanWriteToStorage foreach ($pathParts as $pathPart) { $checkUrl = $this->url . $partURL; if (!empty($partURL) && !$this->hasItems($checkUrl)) { - $response = $this->client->request('delete', $checkUrl, HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $this->authOptions]); + $response = $this->client->request('delete', $checkUrl, [HttpClientOptions::AUTH => $this->authOptions]); if (!$response->isSuccess()) { if ($response->getReturnCode() == "404") { diff --git a/webdav_storage/src/WebDavConfig.php b/webdav_storage/src/WebDavConfig.php index 4a0c3c67..2236e97a 100644 --- a/webdav_storage/src/WebDavConfig.php +++ b/webdav_storage/src/WebDavConfig.php @@ -5,7 +5,6 @@ namespace Friendica\Addon\webdav_storage\src; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Storage\Capability\ICanConfigureStorage; -use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Network\HTTPClient\Client\HttpClientOptions; use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests; @@ -139,7 +138,7 @@ class WebDavConfig implements ICanConfigureStorage ]; } - if (!$this->client->head($url, HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $options])->isSuccess()) { + if (!$this->client->head($url, [HttpClientOptions::AUTH => $options])->isSuccess()) { return [ 'url' => $this->l10n->t('url is either invalid or not reachable'), ];