microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

No way to access headers in batch response

Open
#2,614 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe the problem.

I'm trying to log the Date, request-id and client-request-id headers returned from the api, to follow best practices described here: https://learn.microsoft.com/en-us/graph/best-practices-concept#reliability-and-support

image

When using batch requests, the results are in the BatchResponseContentCollection class. There does not appear to be any way to access the headers in this class without using reflection.

Describe the solution you'd like.

A Header or AdditionalData property added to BatchResponseContentCollection, which contains at least Date, request-id and client-request-id

Additional context?

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BatchResponseContentCollection class and tracing how batch responses are populated. Confirm where response headers are available, then expose the requested headers through the collection and add or update coverage for accessing them.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.