zhenyuT commented on code in PR #133:
URL: 
https://github.com/apache/incubator-hugegraph-commons/pull/133#discussion_r1306700516


##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClient.java:
##########
@@ -17,34 +17,32 @@
 
 package org.apache.hugegraph.rest;
 
-import java.util.Map;
+import okhttp3.Headers;
 
-import jakarta.ws.rs.core.MultivaluedMap;
+import java.util.Map;
 
 public interface RestClient {
     /**
      * Post method
      */
     RestResult post(String path, Object object);
 
-    RestResult post(String path, Object object, MultivaluedMap<String, Object> 
headers);

Review Comment:
   
之前使用MultivaluedMap作为header传参,MultivaluedMap类在jakarta.ws.rs的包中,这个包目前是要移除的。这里目前是改成使用okhttp包中的Headers,但是感觉也不是特别好的方式,既然RestClient作为一个interface,那照理应该和具体的实现无关才对。是否应该内部提供一个Header对象比较合适?



##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClient.java:
##########
@@ -17,34 +17,32 @@
 
 package org.apache.hugegraph.rest;
 
-import java.util.Map;
+import okhttp3.Headers;
 
-import jakarta.ws.rs.core.MultivaluedMap;
+import java.util.Map;
 
 public interface RestClient {
     /**
      * Post method
      */
     RestResult post(String path, Object object);
 
-    RestResult post(String path, Object object, MultivaluedMap<String, Object> 
headers);

Review Comment:
   
之前使用MultivaluedMap作为header传参,MultivaluedMap类在jakarta.ws.rs的包中,这个包目前是要移除的。这里目前是改成使用okhttp包中的Headers,但是感觉也不是特别好的方式,既然RestClient作为一个interface,那照理应该和具体的实现无关才对。是否应该内部提供一个Header对象比较合适?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to