Merge pull request #1006 from MrPetovan/task/curl_DI

Introduce "HTTPRequest" class
This commit is contained in:
Michael Vogel 2020-07-25 09:50:01 +02:00 committed by GitHub
commit 2c69a9c359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 34 additions and 49 deletions

View file

@ -12,7 +12,6 @@ use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Util\ConfigFileLoader;
use Friendica\Util\Network;
use Friendica\Util\XML;
function geonames_install()
@ -78,7 +77,7 @@ function geonames_post_hook(App $a, array &$item)
/* OK, we're allowed to do our stuff. */
$s = Network::fetchUrl('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
$s = DI::httpRequest()->fetch('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
if (!$s) {
return;