7digital / SevenDigital.Api.Wrapper

A fluent c# wrapper for the 7digital API
MIT License
16 stars 29 forks source link

WithTraceId should accept an array #231

Open gregsochanik opened 9 years ago

gregsochanik commented 9 years ago

In order for this functionality to work better with

https://github.com/7digital/TraceIds

WithTraceId(string traceId)

Should be able to accept a list of TraceIds to enable logging, monitoring of a complete list of traces.

gregsochanik commented 9 years ago

Had a look at this and is currently problematic due to the fact that the wrapper creates and passes around its own Request object that has headers as IDictionary<string,string> rather than just using the .NET HttpRequestMessage (which allows Headers.Add(string, IEnumerable<string>).

This is a hangover from the days before .NET 4.5s HttpClient, and a lot of this code can be refactored / removed to allow HttpRequestMessage to contain the request info instead. I'll try and tackle it asap.