microsoft / PowerPlatform-DataverseServiceClient

Code Replica for Microsoft.PowerPlatform.Dataverse.Client and supporting nuget packages.
MIT License
284 stars 52 forks source link

Cloned connections lacking option to have their own custom headers #438

Closed svejdo1 closed 7 months ago

svejdo1 commented 8 months ago

Ref: https://github.com/microsoft/PowerPlatform-DataverseServiceClient/blob/master/src/GeneralTools/DataverseClient/Client/ServiceClient.cs (line 1420)

When we're cloning ServiceClient the CustomHeaders function is always set to match the parent. This makes impossible to set custom headers per clonned connection.

MattB-msft commented 8 months ago

@svejdo1, thanks for your report, Yes, this is a known issue.

On the bright side, we are about to ship a new feature to address this specific issue. This new feature is a request builder where you can set headers per request, as well as user ID, request ID and so on.

MattB-msft commented 7 months ago

Fixed with https://github.com/microsoft/PowerPlatform-DataverseServiceClient/pull/444