|
|
|
@ -12,12 +12,14 @@ import java.net.ProtocolException;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
|
|
public class SearchServiceGet {
|
|
|
|
|
public static String executeSearchGet(String sickname,String address){
|
|
|
|
|
public static String executeSearchGet(String name){
|
|
|
|
|
HttpURLConnection connection = null;
|
|
|
|
|
InputStream in = null;
|
|
|
|
|
|
|
|
|
|
String Url = "http://106.54.210.208:8080/ChineseM"+address;
|
|
|
|
|
String path = Url + "?sickname="+sickname;
|
|
|
|
|
String address="/rest/cmkg/question";
|
|
|
|
|
|
|
|
|
|
String Url = "http://localhost:8080"+address;
|
|
|
|
|
String path = Url + "?name="+name;
|
|
|
|
|
URL url = null;
|
|
|
|
|
try {
|
|
|
|
|
url = new URL(path);
|
|
|
|
@ -37,6 +39,7 @@ public class SearchServiceGet {
|
|
|
|
|
}
|
|
|
|
|
//这时候response就是一个连续字符串了吧
|
|
|
|
|
Log.i("response+++++",response+"返回值");
|
|
|
|
|
System.out.println(response.toString());
|
|
|
|
|
return response.toString();
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
@ -60,4 +63,8 @@ public class SearchServiceGet {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String args[]){
|
|
|
|
|
executeSearchGet("平和质");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|