generated from root/miduo_server
疯体ios更换appid
parent
6a930203f4
commit
548baca680
|
@ -23,7 +23,7 @@ public class QuickVerifyService3 extends AbstractVerifyService {
|
||||||
public static int isTestLan=0;
|
public static int isTestLan=0;
|
||||||
private final static String product_code = "59089882210126220068309806520046";
|
private final static String product_code = "59089882210126220068309806520046";
|
||||||
|
|
||||||
private final static String iosAppId = "6485653974664449";
|
private final static String iosAppId = "6485653972429833";
|
||||||
|
|
||||||
public QuickVerifyService3(String sign) {
|
public QuickVerifyService3(String sign) {
|
||||||
super(sign);
|
super(sign);
|
||||||
|
|
|
@ -6,16 +6,16 @@ import org.apache.http.NameValuePair;
|
||||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.http.client.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
|
||||||
import org.apache.http.entity.StringEntity;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.message.BasicNameValuePair;
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.*;
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -40,24 +40,6 @@ public class HttpUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String doPost2(String url, String json) throws IOException {
|
|
||||||
CloseableHttpClient httpclient = HttpClients.createDefault();
|
|
||||||
HttpPost httpPost = new HttpPost(url);
|
|
||||||
StringEntity stringEntity = new StringEntity(json,ContentType.APPLICATION_FORM_URLENCODED);
|
|
||||||
httpPost.setEntity(stringEntity);
|
|
||||||
CloseableHttpResponse response2 = httpclient.execute(httpPost);
|
|
||||||
|
|
||||||
try {
|
|
||||||
HttpEntity entity = response2.getEntity();
|
|
||||||
return EntityUtils.toString(entity);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return null;
|
|
||||||
} finally {
|
|
||||||
response2.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<NameValuePair> getFromMap(Map<String,String> parms){
|
public static List<NameValuePair> getFromMap(Map<String,String> parms){
|
||||||
List<NameValuePair> nvps = new ArrayList<NameValuePair>(parms.size());
|
List<NameValuePair> nvps = new ArrayList<NameValuePair>(parms.size());
|
||||||
for(Map.Entry<String,String> item : parms.entrySet()){
|
for(Map.Entry<String,String> item : parms.entrySet()){
|
||||||
|
|
Loading…
Reference in New Issue