|
|
|
|
@ -95,6 +95,12 @@ class Client implements IClient { |
|
|
|
|
$options[RequestOptions::HEADERS]['Accept-Encoding'] = 'gzip'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Fallback for save_to |
|
|
|
|
if (isset($options['save_to'])) { |
|
|
|
|
$options['sink'] = $options['save_to']; |
|
|
|
|
unset($options['save_to']); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $options; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -218,7 +224,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
@ -249,7 +255,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
@ -284,7 +290,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
@ -324,7 +330,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
@ -359,7 +365,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
@ -394,7 +400,7 @@ class Client implements IClient { |
|
|
|
|
* 'referer' => true, // add a Referer header |
|
|
|
|
* 'protocols' => ['https'] // only allow https URLs |
|
|
|
|
* ], |
|
|
|
|
* 'save_to' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'sink' => '/path/to/file', // save to a file or a stream |
|
|
|
|
* 'verify' => true, // bool or string to CA file |
|
|
|
|
* 'debug' => true, |
|
|
|
|
* 'timeout' => 5, |
|
|
|
|
|