Code example for DefaultHttpClient

Methods: getCookieStore

0
    private boolean authenticate(int retryCount) throws IOException {
        if (usingDevServer) {
            BasicClientCookie2 cookie = new BasicClientCookie2("dev_appserver_login", "irssinotifier@gmail.com:False:118887942201532232498");
            cookie.setDomain("10.0.2.2");
            cookie.setPath("/");
            http_client.getCookieStore().addCookie(cookie);
 
            return true; 
        } 
 
        String token = preferences.getAuthToken();
        try { 
            if (token == null) {
                String accountName = preferences.getAccountName();
                if (accountName == null) {
                    return false; 
                } 
 
                token = generateToken(accountName);
                preferences.setAuthToken(token);
Connect your IDE to all the code out there  Get Codota for Java