APP代码提交
This commit is contained in:
parent
1386bc7008
commit
b64b79d0a6
@ -23,9 +23,8 @@ public class App {
|
||||
String authoStr = geAuthorization(clientId, clientSecret);
|
||||
HashMap<String, String> HeaderMap = new HashMap();
|
||||
//HeaderMap.put("Content-Type", "application/x-www-form-urlencoded");
|
||||
HeaderMap.put("grant_type","authorization_code");
|
||||
HeaderMap.put("grant_type", "authorization_code");
|
||||
HeaderMap.put("Authorization", authoStr);
|
||||
HeaderMap.put("appkey", "676a5c4adf8dd659219cb2a0");
|
||||
//HeaderMap.put("accept", "*/*");
|
||||
//HeaderMap.put("connection", "Keep-Alive");
|
||||
System.out.println("url地址为=============="+url);
|
||||
@ -44,12 +43,11 @@ public class App {
|
||||
String url = "https://idm.yili.com:7777/ms_oauth/resources/userprofile/me";
|
||||
|
||||
String authoStr = token;
|
||||
HashMap<String, String> HeaderMap = new HashMap();
|
||||
HashMap<String, String> HeaderMap = new HashMap<>();
|
||||
HeaderMap.put("Content-Type", "application/x-www-form-urlencoded");
|
||||
HeaderMap.put("Authorization", authoStr);
|
||||
HeaderMap.put("accept", "*/*");
|
||||
HeaderMap.put("connection", "Keep-Alive");
|
||||
HeaderMap.put("appkey", "676a5c4adf8dd659219cb2a0");
|
||||
// do request get
|
||||
userInfoJson = HttpJavaUtil.doGet(url, HeaderMap);
|
||||
System.out.println(userInfoJson);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user