Use HTTPRequestOptions constants for HTTPClient::get()

This commit is contained in:
Philipp 2021-08-25 21:18:06 +02:00
parent aad7bac686
commit 0cafa871f1
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
7 changed files with 22 additions and 16 deletions

View file

@ -28,6 +28,7 @@ use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\User;
use Friendica\Network\HTTPRequestOptions;
use Friendica\Util\HTTPSignature;
use Friendica\Util\Strings;
@ -101,7 +102,7 @@ class Magic extends BaseModule
);
// Try to get an authentication token from the other instance.
$curlResult = DI::httpRequest()->get($basepath . '/owa', ['header' => $header]);
$curlResult = DI::httpRequest()->get($basepath . '/owa', [HTTPRequestOptions::HEADERS => $header]);
if ($curlResult->isSuccess()) {
$j = json_decode($curlResult->getBody(), true);