Skip to content

Commit

Permalink
Merge 11f7a02 into ef74f3d
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrlog committed Jan 7, 2019
2 parents ef74f3d + 11f7a02 commit 1a20726
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -32,7 +32,7 @@ $request = new Request($url);
$request
->setDefaultSpeedOptions(true)
->setDownloadOnlyIf('text/html')
->setDestkopUserAgent()
->setDesktopUserAgent()
;
$result = $request->exec();
if ($result instanceof \PiedWeb\Curl\Response) {
Expand All @@ -57,7 +57,7 @@ $r
->setReferer(string $url)

->setUserAgent(string $ua)
->setDestkopUserAgent()
->setDesktopUserAgent()
->setMobileUserAgent()
->setLessJsUserAgent()

Expand Down
4 changes: 2 additions & 2 deletions src/UserAgentTrait.php
Expand Up @@ -5,11 +5,11 @@
trait UserAgentTrait
{
/**
* An self::setUserAgent()'s alias to add an user-agent wich correspond to a Destkop PC.
* An self::setUserAgent()'s alias to add an user-agent wich correspond to a Desktop PC.
*
* @return self
*/
public function setDestkopUserAgent()
public function setDesktopUserAgent()
{
$this->setUserAgent('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0');

Expand Down
8 changes: 4 additions & 4 deletions tests/RequestTest.php
Expand Up @@ -17,7 +17,7 @@ public function testNotDownload()
->setDefaultGetOptions()
->setDownloadOnlyIf('html')
->setReturnHeader()
->setDestkopUserAgent()
->setDesktopUserAgent()
->setEncodingGzip()
;
$result = $request->exec();
Expand All @@ -34,7 +34,7 @@ public function testEffectiveUrl()
->setDefaultGetOptions()
->setDownloadOnlyIf('html')
->setReturnHeader()
->setDestkopUserAgent()
->setDesktopUserAgent()
->setEncodingGzip()
;
$result = $request->exec();
Expand All @@ -53,7 +53,7 @@ public function testCurlError()
$request
->setDefaultGetOptions()
->setReturnHeader()
->setDestkopUserAgent()
->setDesktopUserAgent()
->setEncodingGzip()
;
$result = $request->exec();
Expand All @@ -69,7 +69,7 @@ public function test404()
$request
->setDefaultGetOptions()
->setDownloadOnlyIf('html')
->setDestkopUserAgent()
->setDesktopUserAgent()
->setEncodingGzip()
;
$result = $request->exec();
Expand Down

0 comments on commit 1a20726

Please sign in to comment.