zh21608 commited on
Commit
8785070
·
1 Parent(s): 4b42057
src/main/java/com/bitservice/Aidemo/AIController.java CHANGED
@@ -44,10 +44,10 @@ public class AIController {
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);
 
44
  CloseableHttpResponse response = null;
45
  try {
46
  CloseableHttpResponse httpResponse = httpclient.execute(httpPost);
47
+ Header[] headers = httpResponse.getHeaders("operation-location");
48
+ System.out.println("headers: " + headers);
49
  // result = httpclient.execute(httpPost, handler);
50
+ result = headers[0].getValue();
51
  System.out.println("result: " + result);
52
  HttpGet httpget = new HttpGet(result);
53
  httpget.addHeader("api-key", api_key);