Make "HTTPRequest::fetchUrlFull" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:19:59 +01:00
parent da66214547
commit f4cfdb4f5f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
2 changed files with 2 additions and 2 deletions

View file

@ -170,7 +170,7 @@ function mailstream_do_images($a, &$item, &$attachments) {
continue; continue;
} }
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-'); $cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
$curlResult = HTTPRequest::fetchUrlFull($url, true, 0, '', $cookiejar); $curlResult = DI::httpRequest()->fetchUrlFull($url, true, 0, '', $cookiejar);
$attachments[$url] = [ $attachments[$url] = [
'data' => $curlResult->getBody(), 'data' => $curlResult->getBody(),
'guid' => hash("crc32", $url), 'guid' => hash("crc32", $url),

View file

@ -91,7 +91,7 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url)
$api_url = $api_base_url . '/api/v1/custom_emojis'; $api_url = $api_base_url . '/api/v1/custom_emojis';
$fetchResult = HTTPRequest::fetchUrlFull($api_url); $fetchResult = DI::httpRequest()->fetchUrlFull($api_url);
if ($fetchResult->isSuccess()) { if ($fetchResult->isSuccess()) {
$emojis_array = json_decode($fetchResult->getBody(), true); $emojis_array = json_decode($fetchResult->getBody(), true);