Open utterances-bot opened 1 year ago
Hey, Thanks for in detail explanation, Microsoft has a nugget package for handling header propagation Microsoft.AspNetCore.HeaderPropagation It is easier to use.
Good point! I'll update the article. Thanks for pointing it out
@bellons91 Great, Here is a good blog about that. You can also create a new blog post as a new approach for handling this :)
Without Adding line "builder.Services.AddHttpClient("items") .AddHeaderPropagation(options => options.HeaderNames.Add("my-correlation-id"));" headers are not getting propagated..would u be able to explain why?
Actually, no.
I found out that if you don't specify the HttpClient's name it doesn't work. But I still haven't figured out why.
How to propagate HTTP Headers (and Correlation IDs) using HttpClients in C# - Code4IT
Propagating HTTP Headers can be useful, especially when dealing with Correlation IDs. It's time to customize our HttpClients!
https://www.code4it.dev/blog/propagate-httpheader-and-correlation-id