Authored by zhaoyue

Add login and mod password

... ... @@ -5,7 +5,7 @@ package com.xkl;
*/
public interface Constants {
// String URL_PREFIX = "http://127.0.0.1:8090";
// String URL_PREFIX = "http://127.0.0.1:8090";
// String URL_PREFIX = "http://139.129.166.85:8090";
String URL_PREFIX = "https://www.hanhezy.com:8090/";
... ...
... ... @@ -47,7 +47,7 @@ public class AccountTest {
params.put("password", EncodeTools.encode("MD5", pass)); // encode password with MD5 algorithm
params.put("newpwd", EncodeTools.encode("MD5", newpwd)); // encode password with MD5 algorithm
params.put("t", HttpTools.getNow());
String response = HttpTools.requestByMap(URL_LOGIN, "POST", params);
String response = HttpTools.requestByMap(URL_LOGIN, "PUT", params);
System.out.println("login success:" + response);
JSONObject jsonObject = new JSONObject(response);
JSONObject content = jsonObject.getJSONObject("content");
... ...