Sets a cookie on this request instance.
@param name The cookie name.
@param value The value of the cookie to set.
347092
public void setCookie(final String name, final String value) {
		if (name != null) {
			Cookie cookie = new Cookie(name, value);
			cookies.put(name, cookie);
		}
	}
1006873
protected String cookieValue(String name){
        Cookie cookie = cookie(name);
        return cookie != null ? cookie.getValue() : null;
    }
571653
protected function addCookieBoolOption($name, $value)
    {
        if ($value === true || $value === false) {
            $this->addOption('cookie', $name, $value);
        }
    }
567816
public function setCookie($name, $value, $expires, $domain)
	{
		setcookie($name, $value, $expires, $domain);
		$_COOKIE[$name] = $value;
	}
159413
public void set(String name, Object value) {
        if (value != null) {
            attributes.put(name, String.valueOf(value));
        } else {
            attributes.remove(name);
        }

    }
1305477
public static Builder cookie(String name, String value) {
        return builder(name, value)
                // Populate default:
                .setPath("/").setHttpOnly(true).setSecure(false).setMaxAge(3600);
    }
1063151
public Site addCookie(String name, String value) {
        defaultCookies.put(name, value);
        return this;
    }
968859
public final static void addCookie(String name, String value, int maxAgeInSeconds) {
		addCookie(name, value, maxAgeInSeconds, "/", null);
	}
684914
public void setHeader(String name, Object value) {
    verifyType(name, value);
    if (value != null) {
      // Modify header if necessary
      if (!ObjectUtils.nullSafeEquals(value, getHeader(name))) {
        this.modified = true;
        this.headers.put(name, value);
      }
    } else {
      // Remove header if available
      if (this.headers.containsKey(name)) {
        this.modified = true;
        this.headers.remove(name);
      }
    }
  }
1335473
public void set(String name, String value)
    {
        HeaderName hn = getHeaderName(name);
        set(hn, value);
    }
469767
function set(name, value) {

        // if no value then remove
        if (!value) {
            remove(name);
            return;
        }

        if (localStorage) {
            try {
                localStorage.setItem(name, value);
            }
            catch (ex) {}
        }

        _.isFunction($cookies.put) ?
            $cookies.put(name, value, { domain: cookieDomain }) :
            $cookies[name] = value;

    }
1071767
def set(self, name, value, **kwargs):
        
        # support client code that unsets cookies by assignment of a None value:
        if value is None:
            remove_cookie_by_name(self, name, domain=kwargs.get('domain'), path=kwargs.get('path'))
            return

        if isinstance(value, Morsel):
            c = morsel_to_cookie(value)
        else:
            c = create_cookie(name, value, **kwargs)
        self.set_cookie(c)
        return c
371617
public void sendCookie(String name, String value) {
        context.addCookie(Cookie.builder(name, value).build());
    }
967070
public String encode(String name, String value) {
        return encode(new DefaultCookie(name, value));
    }
623420
public static void setCookie(String name, String value, int maxAge, HttpServletRequest request, HttpServletResponse response) {
		boolean httpOnly = false;
		CookieUtil.setCookie(name, value, maxAge, httpOnly, request, response);
	}
71709
public void setAttribute(String name, Object value) {
		this.webSocketSession.getAttributes().put(name, value);
	}
64318
public function set_cookie($name, $value = null)
	{
		is_null($value)
			? $this->connection()->__setCookie($name)
			: $this->connection()->__setCookie($name, $value);
	}