Skip to content

transport/grpc: support option.WithAPIKey #485

@broady

Description

@broady

google.golang.org/ap/option says:

API Keys can only be used for JSON-over-HTTP APIs, including those under the import path google.golang.org/api/....

Not true, though, API keys can be used with gRPC.

Need to use the x-api-key metadata key:

ctx = metadata.NewOutgoingContext(ctx, metadata.Pairs("x-api-key", ...))

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions