Move "getUserAgent()" to "HTTPRequest" class

This commit is contained in:
nupplaPhil 2020-03-04 22:26:38 +01:00 committed by Hypolite Petovan
parent cebdcb6599
commit 57587efe58
4 changed files with 26 additions and 27 deletions

View file

@ -350,7 +350,7 @@ class Network
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $a->getUserAgent());
curl_setopt($ch, CURLOPT_USERAGENT, DI::httpRequest()->getUserAgent());
curl_exec($ch);
$curl_info = @curl_getinfo($ch);
@ -394,7 +394,7 @@ class Network
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $a->getUserAgent());
curl_setopt($ch, CURLOPT_USERAGENT, DI::httpRequest()->getUserAgent());
$body = curl_exec($ch);
curl_close($ch);