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:
parent
48d6650f28
commit
edaa353826
@ -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{
|
||||
|
@ -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,")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user