mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"
This commit is contained in:
parent
31bd1a1ba0
commit
9640142a72
18 changed files with 50 additions and 45 deletions
|
@ -9,13 +9,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use Friendica\DI;
|
||||
use Friendica\Core\Cache\Duration;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\ConfigFileLoader;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
const OSM_TMS = 'https://www.openstreetmap.org';
|
||||
|
@ -132,7 +132,7 @@ function openstreetmap_get_coordinates($a, &$b)
|
|||
$j = DI::cache()->get($cachekey);
|
||||
|
||||
if (is_null($j)) {
|
||||
$curlResult = Network::curl($nomserver . $args);
|
||||
$curlResult = HTTPRequest::curl($nomserver . $args);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$j = json_decode($curlResult->getBody(), true);
|
||||
DI::cache()->set($cachekey, $j, Duration::MONTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue