Post接口
public void login() throws Exception {
//创建httpclient链接
CloseableHttpClient client=HttpClients.createDefault();
//创建Post请求
HttpPost post=new HttpPost("http://index.php?s=/index/user/login.html");
//添加http请求头
post.setHeader("X-Requested-With", "XMLHttpRequest");
//添加Post请求参数
BasicNameValuePair userNameValuePair=new BasicNameValuePair("accounts", "m");
BasicNameValuePair pwdValuePair=new BasicNameValuePair("pwd", "m=");
ArrayList<NameValuePair> paramsList=new ArrayList<NameValuePair>();
paramsL