src/Request.php
public function setCookieFile($cookieFile, $cookieJar = null)
    {
        if (is_file($cookieFile)) {
            $cookieJar = empty($cookieJar) ? $cookieFile : $cookieJar;
            $this->curlOptions[ CURLOPT_COOKIEFILE ] = $cookieFile;
            $this->curlOptions[ CURLOPT_COOKIEJAR ] = $cookieJar;
        }

        return $this;
    }
public function setCookieFile($cookieFile, $cookieJar = null)
    {
        if (is_file($cookieFile)) {
            $cookieJar = empty($cookieJar) ? $cookieFile : $cookieJar;
            $this->curlOptions[ CURLOPT_COOKIEFILE ] = $cookieFile;
            $this->curlOptions[ CURLOPT_COOKIEJAR ] = $cookieJar;
        }

        return $this;
    }
Request::setCookieFile

Sets the cookie file to be used in the HTTP request.

@param string      $cookieFile The name of the file containing the cookie data.
@param string|null $cookieJar  The name of a file to save all internal cookies to when the handle is closed,
e.g. after a call to curl_close.

@return static