Code example for CookieStore

Methods: add

0
		 
		CookieStore store = manager.getCookieStore();
 
		try { 
			HttpCookie cookie = new HttpCookie(key, value);
			store.add(new URI(domain), cookie);
		} catch (URISyntaxException e) {
			Log.e(TAG, e.getMessage());
			e.printStackTrace();
		} 
	} 
	 
	@SuppressWarnings("unchecked") 
	public void addCookies(String url, Map<String, String> cookies) {
		if ((url == null) || (cookies == null) || (cookies.size() == 0)) {
			return; 
		} 
 
		String domain = NetHelper.getDomain(url);
		 
Contextual code suggestions in your IDE  Get Codota for Java