You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/21 07:13:48 UTC

[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #8917: HTTPServer support the handler register with allowed HTTP methods

kezhenxu94 commented on code in PR #8917:
URL: https://github.com/apache/skywalking/pull/8917#discussion_r854857902


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/server/HTTPHandlerRegister.java:
##########
@@ -18,8 +18,10 @@
 
 package org.apache.skywalking.oap.server.core.server;
 
+import com.linecorp.armeria.common.HttpMethod;
+import java.util.List;
 import org.apache.skywalking.oap.server.library.module.Service;
 
 public interface HTTPHandlerRegister extends Service {
-    void addHandler(Object httpService);
+    void addHandler(Object httpService, List<HttpMethod> allowedMethods);

Review Comment:
   `allowedMethods` should not be handler level, it should be server level, so I don't think it is a good idea to set in `addHandler` method, it should be set in constructing an `HTTPServer`



##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/server/HTTPHandlerRegister.java:
##########
@@ -18,8 +18,10 @@
 
 package org.apache.skywalking.oap.server.core.server;
 
+import com.linecorp.armeria.common.HttpMethod;
+import java.util.List;
 import org.apache.skywalking.oap.server.library.module.Service;
 
 public interface HTTPHandlerRegister extends Service {
-    void addHandler(Object httpService);
+    void addHandler(Object httpService, List<HttpMethod> allowedMethods);

Review Comment:
   `allowedMethods` can't be handler level, it should be server level, so I don't think it is a good idea to set in `addHandler` method, it should be set in constructing an `HTTPServer`



-- 
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: notifications-unsubscribe@skywalking.apache.org

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