From: Philipp Date: Wed, 25 Aug 2021 11:54:53 +0000 (+0200) Subject: Fixup HTTP headers for httpClient requests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7662d1ef1cff25e7674353689c695c1b483e7e49;p=friendica-addons.git Fixup HTTP headers for httpClient requests --- diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 56e04f78..72e600ee 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -224,7 +224,7 @@ EOT; Logger::log('dwpost: data: ' . $xml, Logger::DATA); if ($dw_blog !== 'test') { - $x = DI::httpRequest()->post($dw_blog, $xml, ["Content-Type: text/xml"])->getBody(); + $x = DI::httpRequest()->post($dw_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG); diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index aad2a696..cbd7e9b0 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -219,7 +219,7 @@ EOT; Logger::log('ijpost: data: ' . $xml, Logger::DATA); if ($ij_blog !== 'test') { - $x = DI::httpRequest()->post($ij_blog, $xml, ["Content-Type: text/xml"])->getBody(); + $x = DI::httpRequest()->post($ij_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::log('posted to insanejournal: ' . $x ? $x : '', Logger::DEBUG); } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 0cab2aa4..896099d8 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -234,7 +234,7 @@ EOT; Logger::log('ljpost: data: ' . $xml, Logger::DATA); if ($lj_blog !== 'test') { - $x = DI::httpRequest()->post($lj_blog, $xml, ["Content-Type: text/xml"])->getBody(); + $x = DI::httpRequest()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } Logger::log('posted to livejournal: ' . ($x) ? $x : '', Logger::DEBUG); }