sets the cookies (should be a dictionary)
508267
def set_session(self, cookies):
        
        self.__session.cookies = requests.utils.cookiejar_from_dict(cookies)
1353129
def COOKIES(self):
        
        depr('The COOKIES dict is deprecated. Use `set_cookie()` instead.') # 0.10
        if not self._cookies:
            self._cookies = SimpleCookie()
        return self._cookies
318274
function fixedSaveCookies(res) {
    const cookies = res.headers['set-cookie'];

    if (cookies) {
        const fixedCookies = cookies.reduce(
            (cookies, cookie) => cookies.concat(cookie.split(/,(?!\s)/)),
            []
        );
        this.jar.setCookies(fixedCookies);
    }
}
190538
function(headers) {
    var cookies = headers['set-cookie']
    if (cookies) {
      cookies.forEach(function(c) {
        var cookiesParams = c.split(';')
        var cookiePair = cookiesParams.shift().split('=')
        var options = {}
        cookiesParams.forEach(function(param) {
          param = param.trim()
          if (param.toLowerCase().indexOf('expires') == 0) {
            var date = param.split('=')[1].trim()
            options.expires = new Date(date)
          }
        })
        this.set(cookiePair[0].trim(), cookiePair[1].trim(), options)
      }.bind(this))
    }
  }
757080
def set_cookie(self, name: str, value: str, *,
                   expires: Optional[str]=None,
                   domain: Optional[str]=None,
                   max_age: Optional[Union[int, str]]=None,
                   path: str='/',
                   secure: Optional[str]=None,
                   httponly: Optional[str]=None,
                   version: Optional[str]=None) -> None:
        

        old = self._cookies.get(name)
        if old is not None and old.coded_value == '':
            # deleted cookie
            self._cookies.pop(name, None)

        self._cookies[name] = value
        c = self._cookies[name]

        if expires is not None:
            c['expires'] = expires
        elif c.get('expires') == 'Thu, 01 Jan 1970 00:00:00 GMT':
            del c['expires']

        if domain is not None:
            c['domain'] = domain

        if max_age is not None:
            c['max-age'] = str(max_age)
        elif 'max-age' in c:
            del c['max-age']

        c['path'] = path

        if secure is not None:
            c['secure'] = secure
        if httponly is not None:
            c['httponly'] = httponly
        if version is not None:
            c['version'] = version
289534
def _cookies_for_request(self, request):
        """"""
        cookies = []
        for domain in self._cookies.keys():
            cookies.extend(self._cookies_for_domain(domain, request))
        return cookies
902504
def add_cookie(self, cookie):
		
		if self.__ro_flag:
			raise RuntimeError('Read-only cookie-jar changing attempt')
		self.__cookies[cookie.name()] = cookie
762508
def __addcookies(self):
        '''
        '''
        for cname, morsel in self.cookies.items():
            attrs = []
            value = morsel.get('version', '')
            if value != '' and value != '0':
                attrs.append('$Version=%s' % value)
            attrs.append('%s=%s' % (cname, morsel.coded_value))
            value = morsel.get('path')
            if value:
                attrs.append('$Path=%s' % value)
            value = morsel.get('domain')
            if value:
                attrs.append('$Domain=%s' % value)
            self.h.putheader('Cookie', "; ".join(attrs))
409467
def setCookies(browser, domain, cookieJar):
        
        return BrowserCookies.browsers[browser].writeCookies(domain, cookieJar)
541494
def save(self, set_cookie, **params):
        """"""
        if set(self.store.items()) ^ set(self.items()):
            value = dict(self.items())
            value = json.dumps(value)
            value = self.encrypt(value)
            if not isinstance(value, str):
                value = value.encode(self.encoding)
            set_cookie(self.key, value, **self.params)
            return True
        return False
611365
public function configureCookie()
    {
        $settingFields = ['expires', 'path', 'domain', 'secure', 'key', 'httpOnly', 'encryption'];
        $settings = $this->config('settings');
        $cookieKey = $this->config('cookieKey');
        foreach ($settingFields as $field) {
            if (isset($settings[$field])) {
                $this->Cookie->configKey($cookieKey, $field, $settings[$field]);
            }
        }
    }
44115
function setItem(key, value) {
  var expires = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;

  if (!isCookieEnabled) {
    session.setItem(key, value);
    log('I\'ve saved "' + key + '" in a plain object :)', 'warning', debug);
    return;
  }

  cookie.set(key, value, { expires: expires });
  log('I\'ve saved "' + key + '" in a cookie :)', 'warning', debug);
}
352732
def _make_cookie(self):
        
        return struct.pack(self.COOKIE_FMT, self.COOKIE_MAGIC,
                           os.getpid(), id(self), thread.get_ident())
26128
function Cookie(name, value, attrs){
  if(!(this instanceof Cookie)) 
    return new Cookie(name, value, attrs);
  if(!name)  throw new TypeError('argument name is invalid');

  this.name   = name;
  this.value  = value;

  for (var key in attrs) {
    this[key] = attrs[key];
  }
  return this;
}
144183
def cookies(self):
        ''''''
        return {
            key: self.raw_cookies[key].value
            for key in self.raw_cookies.keys()
        }
397622
def set_cookie(key, value, options={})
      cookie = ["#{key}=#{value};"]


      if options.has_key? :expires and options[:expires].kind_of? Time
        options[:expires] = options[:expires].utc.strftime('%a, %d-%b-%Y %H:%M:%S GMT')
      end

      # Sort the cookies alphabetically.
      options.sort { |a,b| a.to_s <=> b.to_s }.each do |k,v|
        cookie << "#{k}=#{v.to_s};"
      end

      cookie_val = cookie.join(' ')

      if self.headers['Set-Cookie'].nil?
        self.headers['Set-Cookie'] = [cookie_val]
      else
        self.headers['Set-Cookie'] << cookie_val
      end
    end
101884
def cookies(self):
    
    return [line.strip()
            for line in self.conn.issue_command("GetCookies").split("\n")
            if line.strip()]