Skip to content

Commit

Permalink
Merge pull request #19 from sas1024/master
Browse files Browse the repository at this point in the history
Fix X-Request-ID context key for echo framework compatibility in generated golang client
  • Loading branch information
sas1024 authored Oct 20, 2022
2 parents c9fcb8e + e0c415a commit a4ede6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions golang/go_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ func (rc *rpcClient) Exec(ctx context.Context, rpcReq zenrpc.Request) (*zenrpc.R
req.Header = rc.header.Clone()
req.Header.Add("Content-Type", "application/json")
if xRequestID, ok := ctx.Value("X-Request-ID").(string); ok && xRequestID != "" {
req.Header.Add("X-Request-ID", xRequestID)
if xRequestID, ok := ctx.Value("X-Request-Id").(string); ok && xRequestID != "" {
req.Header.Add("X-Request-Id", xRequestID)
}
// Do request
Expand Down
4 changes: 2 additions & 2 deletions golang/testdata/catalogue_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4ede6e

Please sign in to comment.