mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-05-22 19:51:44 +03:00
Allow passing :authority pseudo header (#33)
This commit is contained in:
committed by
Joshua Humphries
parent
ec219b3c15
commit
75dcbf0d4c
@@ -57,7 +57,9 @@ var (
|
|||||||
addlHeaders multiString
|
addlHeaders multiString
|
||||||
rpcHeaders multiString
|
rpcHeaders multiString
|
||||||
reflHeaders multiString
|
reflHeaders multiString
|
||||||
data = flag.String("d", "",
|
authority = flag.String("authority", "",
|
||||||
|
":authority pseudo header value to be passed along with underlying HTTP/2 requests. It defaults to `host [ \":\" port ]` part of the target url.")
|
||||||
|
data = flag.String("d", "",
|
||||||
`JSON request contents. If the value is '@' then the request contents are
|
`JSON request contents. If the value is '@' then the request contents are
|
||||||
read from stdin. For calls that accept a stream of requests, the
|
read from stdin. For calls that accept a stream of requests, the
|
||||||
contents should include all such request messages concatenated together
|
contents should include all such request messages concatenated together
|
||||||
@@ -256,6 +258,9 @@ func main() {
|
|||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
if *authority != "" {
|
||||||
|
opts = append(opts, grpc.WithAuthority(*authority))
|
||||||
|
}
|
||||||
var creds credentials.TransportCredentials
|
var creds credentials.TransportCredentials
|
||||||
if !*plaintext {
|
if !*plaintext {
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
Reference in New Issue
Block a user