Remove 'headers' option occurrences and add a warning if used.

This commit is contained in:
Philipp 2020-10-18 22:31:26 +02:00
parent c19f1a83ce
commit a74d88c4ee
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
4 changed files with 13 additions and 12 deletions

View file

@ -1639,7 +1639,7 @@ class GServer
if (!empty($accesstoken)) {
$api = 'https://instances.social/api/1.0/instances/list?count=0';
$header = ['Authorization: Bearer '.$accesstoken];
$curlResult = DI::httpRequest()->get($api, ['headers' => $header]);
$curlResult = DI::httpRequest()->get($api, ['header' => $header]);
if ($curlResult->isSuccess()) {
$servers = json_decode($curlResult->getBody(), true);