Spaces:
Build error
Build error
src/main/java/com/bitservice/Aidemo/AIController.java
CHANGED
@@ -43,7 +43,11 @@ public class AIController {
|
|
43 |
httpPost.addHeader("Content-Type", "application/json");
|
44 |
CloseableHttpResponse response = null;
|
45 |
try {
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
System.out.println("result: " + result);
|
48 |
HttpGet httpget = new HttpGet(result);
|
49 |
httpget.addHeader("api-key", api_key);
|
|
|
43 |
httpPost.addHeader("Content-Type", "application/json");
|
44 |
CloseableHttpResponse response = null;
|
45 |
try {
|
46 |
+
CloseableHttpResponse httpResponse = httpclient.execute(httpPost);
|
47 |
+
Header[] allHeaders = httpResponse.getAllHeaders();
|
48 |
+
System.out.println("headers: " + allHeaders);
|
49 |
+
// result = httpclient.execute(httpPost, handler);
|
50 |
+
result = allHeaders[0].getValue();
|
51 |
System.out.println("result: " + result);
|
52 |
HttpGet httpget = new HttpGet(result);
|
53 |
httpget.addHeader("api-key", api_key);
|