public List<Printer> list(String proxy) throws ClientProtocolException,
			IOException, JSONException {
		HttpPost post = new HttpPost(GCP_BASE_URL + "/" + GCP_CMD_LIST);
		addGcpHeaders(post);

		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
		nvps.add(new BasicNameValuePair("proxy", proxy));
		nvps.add(new BasicNameValuePair("output", "json"));

		post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

		HttpResponse response = httpclient.execute(post);
		int code = response.getStatusLine().getStatusCode();

		String responseStr = EntityUtils.toString(response.getEntity());

		if (code == HttpStatus.SC_OK) {
			JSONObject json = new JSONObject(responseStr);
			if (json.has("message")) {
				lastResponse.setMessage(json.getString("message"));
			}

			if (json.getBoolean("success")) {
				List<Printer> list = new ArrayList<Printer>();

				for (int i = 0; i < json.getJSONArray("printers").length(); i++) {
					JSONObject obj = json.getJSONArray("printers")
							.getJSONObject(i);
					Printer printer = new Printer();
					printer.setId(obj.getString("id"));
					printer.setName(obj.getString("name"));
					printer.setDescription(obj.getString("description"));
					printer.setProxy(obj.getString("proxy"));
					list.add(printer);
				}

				lastResponse.setSuccess(true);
				return list;
			} else {
				lastResponse.setSuccess(false);
				return null;
			}
		} else {
			lastResponse.setSuccess(false);
			lastResponse.setMessage("HTTP result code: " + code);
			return null;
		}
	}