Commit 6f611aba authored by chenjian's avatar chenjian

调整

parent 883e72d7
...@@ -29,7 +29,10 @@ public class GetAccessToken { ...@@ -29,7 +29,10 @@ public class GetAccessToken {
HttpPost httpPost = new HttpPost(authUrl); HttpPost httpPost = new HttpPost(authUrl);
httpPost.setHeader("Content-Type", "application/json"); httpPost.setHeader("Content-Type", "application/json");
String json = String.format("{\"username\":\"%s\",\"password\":\"%s\",\"key\":\"%s\",\"captcha\":\"%s\"}", String json = String.format("{\"username\":\"%s\"," +
"\"password\":\"%s\"," +
"\"key\":\"%s\"," +
"\"captcha\":\"%s\"}",
username, password, key, captcha); username, password, key, captcha);
try (CloseableHttpClient httpClient = HttpClients.createDefault();){ try (CloseableHttpClient httpClient = HttpClients.createDefault();){
StringEntity entity = new StringEntity(json); StringEntity entity = new StringEntity(json);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment