1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00

strip body from gateway

This commit is contained in:
Asim Aslam 2022-07-04 10:15:14 +01:00
parent 48d6650f28
commit edaa353826
2 changed files with 0 additions and 5 deletions

View File

@ -36,7 +36,6 @@ func NewGreeterEndpoints() []*api.Endpoint {
Name: "Greeter.Hello",
Path: []string{"/hello"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
{
@ -149,7 +148,6 @@ func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler, opts ...server
Name: "Greeter.Hello",
Path: []string{"/hello"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
opts = append(opts, api.WithEndpoint(&api.Endpoint{

View File

@ -304,9 +304,6 @@ func (g *micro) generateEndpoint(servName string, method *pb.MethodDescriptorPro
g.P("Name:", fmt.Sprintf(`"%s.%s",`, servName, method.GetName()))
g.P("Path:", fmt.Sprintf(`[]string{"%s"},`, path))
g.P("Method:", fmt.Sprintf(`[]string{"%s"},`, meth))
if len(rule.GetGet()) == 0 {
g.P("Body:", fmt.Sprintf(`"%s",`, rule.GetBody()))
}
if method.GetServerStreaming() || method.GetClientStreaming() {
g.P("Stream: true,")
}