You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current functionality allows adding request headers either by HttpClient (HttpClient.DefaultRequestHeaders.Add) or by using ODataClientSettings.BeforeRequest delegate or by using WithHeader/WithHeaders methods directly on IODataClient or ODataBatch.
These all methods set message headers and work fine in case of single operation requests.
In case of batch requests using ODataBatch.WithHeader changes only the multipart message header but does not have any effect in headers on inner operation headers.
adding operations to batch, with WithHeader, does not do anything.
batch += async c => await c
.For("entitycollectionname")
.WithHeader("key1", "value1")
.WithHeader("key2", "value2")
.Set(entity)
.InsertEntryAsync(false, cancellationToken);
Ability to control inner operation headers individually inside the batch request is required to pass special annotations for servers like SAP or Microsoft Dataverse and Microsoft Dynamics 365 CRM.
As first step it would be really helpful if at least main headers were passed to inner headers.
Second step would be to use .WithHeader/.WithHeaders methods from requests added to batch.
Best regards,
Sebastian
The text was updated successfully, but these errors were encountered:
Current functionality allows adding request headers either by HttpClient (
HttpClient.DefaultRequestHeaders.Add
) or by usingODataClientSettings.BeforeRequest
delegate or by usingWithHeader
/WithHeaders
methods directly onIODataClient
orODataBatch
.These all methods set message headers and work fine in case of single operation requests.
In case of batch requests using
ODataBatch.WithHeader
changes only the multipart message header but does not have any effect in headers on inner operation headers.adding operations to batch, with
WithHeader
, does not do anything.Ability to control inner operation headers individually inside the batch request is required to pass special annotations for servers like SAP or Microsoft Dataverse and Microsoft Dynamics 365 CRM.
.WithHeader
/.WithHeaders
methods from requests added to batch.Best regards,
Sebastian
The text was updated successfully, but these errors were encountered: