@Test
public void dopost(){
String httpurl = "https://jin.caimao.com/api/user/loginSalt";
Map params = new HashMap();
params.put("mobile", "XXXX");
params.put("login_pwd", "XXXX");
Editmappost(httpurl,params);
}
public void Editmappost(String url,Map map){
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost(url);
List pair = new ArrayList();
for(Map.Entry entry:map.entrySet()){
pair.add(new BasicNameValuePair(entry.getKey(),entry.getValue().toString()));
}
try {
httppost.setEntity(new UrlEncodedFormEntity(pair));
try {
CloseableHttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();