Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(http): add X-Request-ID if ID is in the context #262

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

EtienneM
Copy link
Member

@EtienneM EtienneM commented Aug 5, 2022

Fix #209

@EtienneM EtienneM force-pushed the fix/209/request_id branch 2 times, most recently from 76a3c73 to 5561b39 Compare August 5, 2022 07:59
@EtienneM EtienneM force-pushed the fix/209/request_id branch from 5561b39 to f2c5f2a Compare August 5, 2022 08:08
Comment on lines +107 to +110
requestID, ok := ctx.Value("request_id").(string)
if ok {
req.HTTPRequest.Header.Add("X-Request-ID", requestID)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the interesting bit...

@EtienneM EtienneM requested a review from johnsudaar August 5, 2022 08:17
@EtienneM EtienneM marked this pull request as ready for review August 5, 2022 08:17
@EtienneM EtienneM enabled auto-merge August 5, 2022 08:21
@EtienneM EtienneM mentioned this pull request Aug 5, 2022
1 task
@EtienneM EtienneM merged commit 7e744f4 into master Aug 5, 2022
@EtienneM EtienneM deleted the fix/209/request_id branch August 5, 2022 08:39
@EtienneM EtienneM mentioned this pull request Aug 31, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There should be a way to forward the request_id header when initializing the client
2 participants