grpcurl
grpcurl copied to clipboard
Too many arguments error
Using GO 1.19 on Windows and it fails with "Too many arguments" error when calling with -d flag
C:\Users\dev>go version
go version go1.19 windows/amd64
C:\Users\dev>grpcurl -d '{"locId": 1}' -plaintext localhost:8980 my.Service/GetLocation
Too many arguments.
Try 'grpcurl -help' for more details.
This is a duplicate of #195.
@asador, please see that other issue for a resolution. The problem is that the Windows command tool/shell does not support quoting/escaping in the way that other modern shells do. So it sees the space in your request body (between the colon and the numeral 1) and thinks those are two different arguments, despite them being enclosed in single quotes.
Thanks. That was it.
since my google search led me here.
In my case I am not on windows but did use the wrong order of arguments.