我的客户端程序是这样的:
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpResponse res = httpClient.execute(req);
服务器端,我编写了一个 JSON 响应。
JSONObject JObject = new JSONObject();
JObject.put("ResponseCode", "100");
JObject.put("Status", "Success");
response.setContentType("application/json");
PrintWriter out = response.getWriter();
out.print(JObject);
out.flush();
我如何才能阅读此内容ResponseCode
并Status
在客户端返回。