]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Salmon.php
Merge branch 'contact-media' of github.com:annando/friendica into contact-media
[friendica.git] / src / Protocol / Salmon.php
index 80846259257ba4b9bd46bd84c3af1971f5f23e7c..95bddcd6553b5d6c4e0efb7e428d5c6de086466d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -72,7 +72,7 @@ class Salmon
                                                $ret[$x] = substr($ret[$x], 5);
                                        }
                                } elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
-                                       $ret[$x] = DI::httpRequest()->fetch($ret[$x]);
+                                       $ret[$x] = DI::httpClient()->fetch($ret[$x]);
                                }
                        }
                }
@@ -155,9 +155,9 @@ class Salmon
                $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                // slap them
-               $postResult = DI::httpRequest()->post($url, $salmon, [
-                       'Content-typeapplication/magic-envelope+xml',
-                       'Content-length: ' . strlen($salmon)
+               $postResult = DI::httpClient()->post($url, $salmon, [
+                       'Content-type' => 'application/magic-envelope+xml',
+                       'Content-length' => strlen($salmon),
                ]);
 
                $return_code = $postResult->getReturnCode();
@@ -180,9 +180,9 @@ class Salmon
                        $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                        // slap them
-                       $postResult = DI::httpRequest()->post($url, $salmon, [
-                               'Content-typeapplication/magic-envelope+xml',
-                               'Content-length: ' . strlen($salmon)
+                       $postResult = DI::httpClient()->post($url, $salmon, [
+                               'Content-type' => 'application/magic-envelope+xml',
+                               'Content-length' => strlen($salmon),
                        ]);
                        $return_code = $postResult->getReturnCode();
                }
@@ -203,9 +203,9 @@ class Salmon
                        $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                        // slap them
-                       $postResult = DI::httpRequest()->post($url, $salmon, [
-                               'Content-typeapplication/magic-envelope+xml',
-                               'Content-length: ' . strlen($salmon)]);
+                       $postResult = DI::httpClient()->post($url, $salmon, [
+                               'Content-type' => 'application/magic-envelope+xml',
+                               'Content-length' => strlen($salmon)]);
                        $return_code = $postResult->getReturnCode();
                }