Explorar o código

Merge pull request #45 from minhphuc429/patch-1

Update Builder.php
Jan Oris %!s(int64=8) %!d(string=hai) anos
pai
achega
088e7afdcf
Modificáronse 1 ficheiros con 24 adicións e 0 borrados
  1. 24 0
      src/Builder.php

+ 24 - 0
src/Builder.php

@@ -134,6 +134,30 @@ class Builder {
         return $this->withCurlOption( $key, $value );
     }
 
+    /**
+	 * Set Cookie File
+	 *
+	 * @param string $cookie_file file name to read cookies from
+	 *
+	 * @return Builder
+	 */
+	public function setCookieFile($cookie_file)
+	{
+		return $this->withOption('CURLOPT_COOKIEFILE', $cookie_file);
+	}
+
+	/**
+	 * Set Cookie Jar
+	 *
+	 * @param string $cookie_jar file name to store cookies to
+	 *
+	 * @return Builder
+	 */
+	public function setCookieJar($cookie_jar)
+	{
+		return $this->withOption('CURLOPT_COOKIEJAR', $cookie_jar);
+	}
+    
     /**
      * Set any specific cURL option
      *