Move ACCEPT constants to own "enum" class

This commit is contained in:
Philipp 2022-04-02 21:16:21 +02:00
parent aed0b53925
commit 82f8c14633
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
8 changed files with 22 additions and 14 deletions

View file

@ -17,6 +17,7 @@ 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;
@ -192,7 +193,7 @@ EOT;
Logger::debug('dwpost: data: ' . $xml);
if ($dw_blog !== 'test') {
$x = DI::httpClient()->post($dw_blog, $xml, ['Content-Type' => 'text/xml'])->getBody();
$x = DI::httpClient()->post($dw_blog, $xml, HttpClientAccept::DEFAULT, ['Content-Type' => 'text/xml'])->getBody();
}
Logger::info('posted to dreamwidth: ' . ($x) ? $x : '');