|
@@ -22,6 +22,7 @@ class Builder {
|
|
|
'SSL_VERIFYPEER' => false,
|
|
|
'NOBODY' => false,
|
|
|
'HEADER' => false,
|
|
|
+ 'ENCODING' => '',
|
|
|
);
|
|
|
|
|
|
/** @var array $packageOptions Array with options that are not specific to cURL but are used by the package */
|
|
@@ -52,6 +53,17 @@ class Builder {
|
|
|
return $this->withCurlOption( 'URL', $url );
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Set the request return content encoding by
|
|
|
+ *
|
|
|
+ * @param string $encode The return string decode by (Default: gzip,deflate)
|
|
|
+ * @return Builder
|
|
|
+ */
|
|
|
+ public function withEncoding($encode = 'gzip,deflate')
|
|
|
+ {
|
|
|
+ return $this->withCurlOption( 'ENCODING', $encode );
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Set the request timeout
|
|
|
*
|