Add cookie to return as Set-Cookie header

@param name  the cookies name
@param value the cookies value
486498
public HttpResponse withCookie(String name, String value) {
        this.cookies.withEntry(name, value);
        return this;
    }
216694
public void addIntHeader(String name, int value) 
    {
        try{_httpResponse.addIntField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
1165664
def cookie_set(self, name, value):
		
		if not self.headers_active:
			raise RuntimeError('headers have already been ended')
		cookie = "{0}={1}; Path=/; HttpOnly".format(name, value)
		self.send_header('Set-Cookie', cookie)
977323
public OkHttpRequest header(String name, String value) {
        builder.header(name, value);
        return this;
    }
1080921
private void setHeader(HttpServletResponse response, String name, String value) {
        if(response.containsHeader(value)) {
              response.setHeader(name, value);
        } else {
            response.addHeader(name, value);
        }
    }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
455036
public HttpHeaders set(String name, String value) {
        final String headerKey = name.toLowerCase(Locale.ROOT);
        if (value == null) {
            headers.remove(headerKey);
        } else {
            headers.put(headerKey, new HttpHeader(name, value));
        }
        return this;
    }
253088
public void addHeader(String name, String value) {
        httpRequest.headers().add(name, value);
    }
556564
public void setHeader(String name, String value) {
		if (headers == null) {
			headers = new HashMap<String, String>();
		}
		if (value != null) {
			headers.put(name, value);
		} else {
			headers.remove(name);
		}
	}
119552
public function addCookie($name, $value = null)
    {
        if (is_array($name)) {
            $this->cookies = $name + $this->cookies;
        } else {
            $this->cookies[$name] = $value;
        }
    }
761128
public HttpRequest withHeader(String name, String value) {
        headers.set(name, value);
        return this;
    }
1171383
public void addHeader(String name, String value) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("The header name must not be null or empty.");
        }

        if (value == null) {
            throw new IllegalArgumentException("The header value must not be null.");
        }

        this.headers.put(name, value);
    }
101730
public void addHeader(HeaderTypes name, String value) {
        headerEntries.add(new HeaderEntry(name.toString(), value));
    }
948012
public void addCookie(String name, String value, HttpServletResponse response) {
        Cookie cookie = new Cookie(name, value);
        cookie.setHttpOnly(httpOnly);
        cookie.setSecure(secure);
        if (StringUtils.isNotEmpty(domain)) {
            cookie.setDomain(domain);
        }
        if (StringUtils.isNotEmpty(path)) {
            cookie.setPath(path);
        }
        if (maxAge != null) {
            cookie.setMaxAge(maxAge);
        }

        response.addCookie(cookie);

        logger.debug(LOG_KEY_ADDED_COOKIE, name);
    }
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);
	}
892639
public HttpLogEntry withResponseHeader(String name, String value) {
    responseHeaders.add(new Header(name, value));
    return this;
  }
1336000
public Response header(String name, String value) {
        checkCommitted();

        getHeaderMap().put(name, value);

        return this;
    }