摘要:
一、使用HttpURLConnection向服务器发送get请求1、向服务器发送get请求 @Test publicvoid sendSms() throws Exception{ String message="货已发到"; message=URLEncoder.encode(message, "UTF-8"); System.out.println(message); String path ="http://localhost:8083/DS_Trade/mobile/sim!add.do?message="+messa... 阅读全文
posted @ 2011-09-19 18:10
Ruthless
阅读(53309)
评论(1)
推荐(2)
摘要:
import net.sf.json.JSONArray;import net.sf.json.JSONException;import net.sf.json.JSONObject;import net.sf.json.JSONSerializer; /** * json对象转换为java对象 * * @throws JSONException */ @Test public void jsonToJava(){ String json="[{\"addTime\":\"2011-09-19 14:23:02\... 阅读全文
posted @ 2011-09-19 15:41
Ruthless
阅读(70105)
评论(8)
推荐(3)
浙公网安备 33010602011771号