You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:28:59 UTC

[GitHub] [dubbo-go] Patrick0308 commented on a change in pull request #677: rest协议支持单url的get、post、put、patch方法

Patrick0308 commented on a change in pull request #677:
URL: https://github.com/apache/dubbo-go/pull/677#discussion_r462067269



##########
File path: protocol/rest/server/server_impl/go_restful_server.go
##########
@@ -82,23 +83,39 @@ func (grs *GoRestfulServer) Start(url common.URL) {
 
 // Publish a http api in go-restful server
 // The routeFunc should be invoked when the server receive a request
-func (grs *GoRestfulServer) Deploy(restMethodConfig *config.RestMethodConfig, routeFunc func(request server.RestServerRequest, response server.RestServerResponse)) {
-	ws := &restful.WebService{}
+func (grs *GoRestfulServer) Deploy(restServiceConfig *config.RestServiceConfig, invoker protocol.Invoker) {
+	/*ws := &restful.WebService{}
 	rf := func(req *restful.Request, resp *restful.Response) {
 		routeFunc(NewGoRestfulRequestAdapter(req), resp)
 	}
 	ws.Path(restMethodConfig.Path).
 		Produces(strings.Split(restMethodConfig.Produces, ",")...).
 		Consumes(strings.Split(restMethodConfig.Consumes, ",")...).
 		Route(ws.Method(restMethodConfig.MethodType).To(rf))
-	grs.container.Add(ws)
+	grs.container.Add(ws)*/
 
+	ws := &restful.WebService{}
+	ws.Path(restServiceConfig.Path)

Review comment:
       It will make user can't define same service path.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org