mirror of
https://github.com/friendica/friendica
synced 2025-04-30 09:04:22 +02:00
Use HTTPRequestOptions constants for HTTPClient::get()
This commit is contained in:
parent
aad7bac686
commit
0cafa871f1
7 changed files with 22 additions and 16 deletions
|
@ -30,6 +30,7 @@ use Friendica\Database\Database;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Network\HTTPRequestOptions;
|
||||
|
||||
/**
|
||||
* Get information about a given URL
|
||||
|
@ -213,7 +214,7 @@ class ParseUrl
|
|||
return $siteinfo;
|
||||
}
|
||||
|
||||
$curlResult = DI::httpRequest()->get($url, ['content_length' => 1000000]);
|
||||
$curlResult = DI::httpRequest()->get($url, [HTTPRequestOptions::CONTENT_LENGTH => 1000000]);
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||
return $siteinfo;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue