fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.36k stars 497 forks source link

error getting request data #355

Open todayforever opened 1 year ago

todayforever commented 1 year ago

Hope to be allowed (error getting request data)

jhump commented 1 year ago

@todayforever, this issue contains no actionable information that we could use to help you. Please provide some details as to what you were trying to do, the command you were trying to run, the error message you got, and any other useful context.

todayforever commented 1 year ago

invoke.go 153: func invokeUnary(ctx context.Context, stub grpcdynamic.Stub, md *desc.MethodDescriptor, handler InvocationEventHandler, requestData RequestSupplier, req proto.Message) error {

156: err := requestData(req)

If the field in req does not contain the field of requesetData, error has no known field named. I hope this restriction can be removed or the user can customize the option

jhump commented 1 year ago

@todayforever, so you mean the JSON data you are providing has properties that are not fields of the request? Why do you want this to be allowed? I don't understand a use case where you'd need to be able to send invalid data.