我正在使用 JSON http post 向我的 Web 服务发送数据,该服务应该使用数据进行 sqlite 查询并检索字符串变量并将其返回给我。我应该如何从 sqlite 查询中检索数据?
try
{
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://server/NCPS/trial.aspx");
post.setHeader("Content-type", "application/json");
post.setHeader("Accept", "application/json");
JSONObject obj = new JSONObject();
obj.put("ic", "s9412953b");
post.setEntity(new StringEntity(obj.toString(), "UTF-8"));
HttpResponse response = client.execute(post);
}catch(IOException e)
{
System.out.println("Error " + e.getMessage());
} catch (JSONException e) {
// TODO Auto-generated catch block
System.out.println("Error " + e.getMessage());
}
}
});trd.start();
}
});
}