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;
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 : '');
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;
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 : '');
}
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;
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 : '');
}
*/
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;
}
/**
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") {
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;
];
}
- 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'),
];