Code example for ClientConnectionManager

Methods: getSchemeRegistry

	public RestClient(){ 
		DefaultHttpClient client = new DefaultHttpClient();
		ClientConnectionManager mgr = client.getConnectionManager();
		HttpParams params = client.getParams();
		SchemeRegistry registry =  mgr.getSchemeRegistry();
		ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);
		mHttpClient = new DefaultHttpClient(manager, params);
	public List<Cookie> getCookies(){
		return mHttpClient.getCookieStore().getCookies();
	 * Transforms the entity contents into a JSONObject if possible, returns null otherwise 
	 * @param entity 
	 * @return JSONObject if the entity is parseable as a JSONObject it will return it 
	 * @throws IllegalStateException 
	 * @throws IOException