yjp 1 ano atrás
pai
commit
6ce717b81d
1 arquivos alterados com 5 adições e 3 exclusões
  1. 5 3
      project/gateway/main.go

+ 5 - 3
project/gateway/main.go

@@ -29,9 +29,11 @@ func main() {
 	defer gateway.DestroyGateway(gw)
 
 	gw.BindPassThrough(prefixRootBinder, &gateway.PassThrough{
-		HttpMethod:   http.MethodGet,
-		RelativePath: "/version",
-		ToUrl:        "http://localhost:31000/example/api/version",
+		HttpMethod: http.MethodGet,
+		SimplePassThrough: &gateway.SimplePassThrough{
+			RelativePath: "/version",
+			ToUrl:        "http://localhost:31000/example/api/version",
+		},
 	})
 
 	go func() {