Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull"

This commit is contained in:
nupplaPhil 2020-03-04 22:35:40 +01:00 committed by Hypolite Petovan
parent 7029012f27
commit 657d08f09f
20 changed files with 32 additions and 34 deletions

View file

@ -460,9 +460,9 @@ class HTTPRequest
* @return string The fetched content
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function fetchUrl(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
public function fetch(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
{
$ret = $this->fetchUrlFull($url, $binary, $timeout, $accept_content, $cookiejar, $redirects);
$ret = $this->fetchFull($url, $binary, $timeout, $accept_content, $cookiejar, $redirects);
return $ret->getBody();
}
@ -484,7 +484,7 @@ class HTTPRequest
* @return CurlResult With all relevant information, 'body' contains the actual fetched content.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function fetchUrlFull(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
public function fetchFull(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
{
return $this->get(
$url,