Code example for BrowserCompatSpec

0
 
public class PortalAPI  
{ 
	String SessionID = "";
	Cookie sessionCookie;
	CookieSpecBase cookieSpecBase = new BrowserCompatSpec();
	 
	public String Login(List<NameValuePair> Credentials) 
	{   
		// Create a new HttpClient and Post Header   
		HttpClient httpclient = new DefaultHttpClient();  
		HttpPost httppost = new HttpPost("https://portal.dedipower.com/api.php?format=json&action=login");  
		HttpResponse response = null;
		JSONObject json;
		String Success;
		 
		try  
		{   
			httppost.setEntity(new UrlEncodedFormEntity(Credentials));  
			response = httpclient.execute(httppost);  
Contextual code suggestions in your IDE  Get Codota for Java