Authored by zhaoyue

Add login and mod password

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