Gets a cookie that was added to the response.
505132
public Cookie getCookie( String cookieName )
    {
        List cookies = getHeaders(SET_COOKIE);
        if(cookies != null){
            // start looking from the back (ie. the last cookie set)
            for(int i = cookies.size(); --i > -1;) {
                Cookie cookie = (Cookie)cookies.get(i);
                if(cookie.getName().equals(cookieName)) {
                    return cookie;
                }
            }
        }

        return null;
    }
1115638
def extract_cookies_to_jar(jar, request, response):
    
    if not (hasattr(response, '_original_response') and
            response._original_response):
        return
    # the _original_response field is the wrapped httplib.HTTPResponse object,
    req = MockRequest(request)
    # pull out the HTTPMessage with the headers and put it in the mock:
    res = MockResponse(response._original_response.msg)
    jar.extract_cookies(res, req)
466545
def set_response_cookie(response, cookie_name, cookie_value):
    
    now = timezone.now()
    expire_date = now + datetime.timedelta(days=365)
    response.set_cookie(cookie_name, cookie_value, expires=expire_date)
574257
def response_cookies(self):
        
        try:
            ret = {}
            for cookie_base_uris in self.response.cookies._cookies.values():
                for cookies in cookie_base_uris.values():
                    for cookie in cookies.keys():
                        ret[cookie] = cookies[cookie].value
            return ret
        except Exception as e:
            self.error = ApiError(
                "Exception in making Request with:: %s\n%s" % (
                    e_, traceback.format_exc()))
            raise Exception(self.error)
337830
def cookie_get(self, name):
		
		if not hasattr(self, 'cookies'):
			return None
		if self.cookies.get(name):
			return self.cookies.get(name).value
		return None
1315290
def process_request(self, request, response):
        
        sid = request.cookies.get(self.cookie_name, None)
        data = {}
        if sid is not None:
            if self.store.exists(sid):
                data = self.store.get(sid)
        request.context.update({self.context_name: data})
360698
public HttpCookie getCookie(String name) {
        if (null == name || 0 == this.parsedList.size()) {
            return null;
        }
        for (HttpCookie cookie : this.parsedList) {
            if (cookie.getName().equals(name)) {
                return cookie;
            }
        }
        return null;
    }
1341537
public function fetchCookies($request, $response)
    {
        foreach ($response->cookies($request) as $cookie) {
            $this->add($cookie);
        }
        return $this;
    }
774351
def request(self, method, url, **kwargs):
        
        # The CookieJar API prevents callers from getting an individual Cookie
        # object by name.
        # We are forced to use the only exposed method of discarding expired
        # cookies from the CookieJar. Internally this involves iterating over
        # the entire CookieJar and calling `.is_expired()` on each Cookie
        # object.
        self.cookies.clear_expired_cookies()

        if self._auto_renew and 'IAMSession' not in self.cookies.keys():
            self.login()

        resp = super(IAMSession, self).request(method, url, **kwargs)

        if not self._auto_renew:
            return resp

        if resp.status_code == 401:
            self.login()
            resp = super(IAMSession, self).request(method, url, **kwargs)

        return resp
279437
def extract_cookies(self, response, request):
        """"""
        _debug("extract_cookies: %s", response.info())
        self._cookies_lock.acquire()
        try:
            self._policy._now = self._now = int(time.time())

            for cookie in self.make_cookies(response, request):
                if self._policy.set_ok(cookie, request):
                    _debug(" setting cookie: %s", cookie)
                    self.set_cookie(cookie)
        finally:
            self._cookies_lock.release()
101884
def cookies(self):
    
    return [line.strip()
            for line in self.conn.issue_command("GetCookies").split("\n")
            if line.strip()]
217321
function getSessionId(cookie) {
		if (typeof(cookie.cookies) === 'string') {
			var idx = cookie.cookies.indexOf('=');
			if (idx !== -1) {
				return _.trim(cookie.cookies.substring(idx + 1), '"') || null;
			}
		}
		return null;
	}
1310210
def get(self, key: Any, default: Any = None) -> Any:
        
        return self._req_cookies.get(key, default)
1045258
function cookie(req, res, next){
  // cookie getter
  req.cookies = Cookie.parse(req.headers['cookie']);
  /**
   * [function cookie setter]
   * @param  {[type]} key   [description]
   * @param  {[type]} value [description]
   * @param  {[type]} attrs [description]
   * @return {[type]}       [description]
   */
  res.cookie = function(key, value, attrs = {}){
    if(value === null) { attrs.expires = new Date(0); value = ''; }
    res.setHeader('Set-Cookie', Cookie(key, value, attrs).toHeader());
  };
  next();
}
218835
function getCookie() {
  if (document.cookie.indexOf(`${disableStr}=true`) > -1) {
    return true;
  } else if (document.cookie.indexOf(`${disableStr}=false`) > -1) {
    return false;
  }

  return null;
}
1337719
public HttpCookie getCookie(String name) {
		List<HttpCookie> cookie = getCookies();
		if (null != cookie) {
			for (HttpCookie httpCookie : cookie) {
				if (httpCookie.getName().equals(name)) {
					return httpCookie;
				}
			}
		}
		return null;
	}
178101
def get_cookie(self, key, secret=None):
        
        value = self.COOKIES.get(key)
        if secret and value:
            dec = cookie_decode(value, secret) # (key, value) tuple or None
            return dec[1] if dec and dec[0] == key else None
        return value or None