// http执行方法
public static String excuteHttp(String url,String... obj){
String result = "";
//建立一个NameValuePair数组,用于存储欲传送的参数
List<NameValuePair> params = new ArrayList<>();
if (obj.length!=0&&!obj[0].isEmpty()){
String[] objParam = new String[obj.length/2];
String[] valueParam = new String[obj.length/2];
for(int i=0;i<obj.length/2;i++){
objParam[i] = obj[i];
}
for(int l=obj.length/2;l<obj.length;l++){
int s =l-obj.length/2;
valueParam[s]=obj[l];
}
for(int v=0;v<obj.length/2;v++){
params.add(new BasicNameValuePair(objParam[v],valueParam[v]));
}
}
HttpPost httpPost = new HttpPost(url);
try {
httpPost.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8));
HttpResponse httpResponse = new DefaultHttpClient().execute(httpPost);
if(httpResponse.getStatusLine().getStatusCode()==200){
HttpEntity httpEntity = httpResponse.getEntity();
result=(EntityUtils.toString(httpEntity));
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {