Subversion Repositories SmartDukaan

Rev

Rev 10166 | Rev 10882 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10166 Rev 10397
Line 42... Line 42...
42
	}
42
	}
43
 
43
 
44
	public void handleLogin() throws ClientProtocolException, IOException{
44
	public void handleLogin() throws ClientProtocolException, IOException{
45
		HttpGet get = new HttpGet("http://selleraccounts.snapdeal.com/keymaker/login");
45
		HttpGet get = new HttpGet("http://selleraccounts.snapdeal.com/keymaker/login");
46
		HttpResponse response = null;
46
		HttpResponse response = null;
47
		try {
-
 
48
			response = client.execute(get);
47
		boolean response_not_null = true;
49
		} catch (ClientProtocolException e) {
-
 
50
			e.printStackTrace();
-
 
51
		} catch (IOException e) {
-
 
52
			e.printStackTrace();
-
 
53
		}
-
 
54
		BufferedReader rd = null;
48
		BufferedReader rd = null;
-
 
49
		while(response_not_null){
55
		try {
50
			try {
56
			rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
51
				response = client.execute(get);
57
		} catch (IllegalStateException e1) {
52
			} catch (Exception e) {
58
			e1.printStackTrace();
53
				e.printStackTrace();
-
 
54
				continue;
-
 
55
			}
-
 
56
			try {
-
 
57
				rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
59
		} catch (IOException e1) {
58
			} catch (Exception e1) {
60
			e1.printStackTrace();
59
				e1.printStackTrace();
-
 
60
				continue;
-
 
61
			}
-
 
62
			response_not_null = false;
61
		}
63
		}
62
		String line = "";
64
		String line = "";
63
		StringBuffer sb = new StringBuffer();
65
		StringBuffer sb = new StringBuffer();
64
		try {
66
		try {
65
			while ((line = rd.readLine()) != null) {
67
			while ((line = rd.readLine()) != null) {